platform: tegra: rtcpu: ivc bus check null

Add a check before dereferencing pointer.

Bug 5597251

Change-Id: Ied1bc79ad631a44bbf9f00f497cfc6e85a62a579
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3480970
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
This commit is contained in:
Rakibul Hassan
2025-11-01 01:38:04 +00:00
committed by mobile promotions
parent e7201ee607
commit 77a8c8c156

View File

@@ -758,6 +758,11 @@ static int tegra_ivc_bus_ready_child(struct device *dev, void *data)
if (drv != NULL) { if (drv != NULL) {
rcu_read_lock(); rcu_read_lock();
ops = rcu_dereference(chan->ops); ops = rcu_dereference(chan->ops);
if (ops == NULL) {
dev_warn(dev, "channel ops not set\n");
rcu_read_unlock();
return 0;
}
if (ops->ready != NULL) if (ops->ready != NULL)
ops->ready(chan, is_ready); ops->ready(chan, is_ready);
rcu_read_unlock(); rcu_read_unlock();