diff options
author | Stefan Wahren <wahrenst@gmx.net> | 2024-04-25 18:58:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-04 18:42:01 +0200 |
commit | 4e81120fe11e2e7f76a9e557f3ca9ab5acb78040 (patch) | |
tree | 9fed36830e1a05af61bac301e9e20811b3cfc96c /drivers/staging | |
parent | a0e244ec59bdc4caac4b7a105f029fd1af28f0f2 (diff) | |
download | linux-4e81120fe11e2e7f76a9e557f3ca9ab5acb78040.tar.gz linux-4e81120fe11e2e7f76a9e557f3ca9ab5acb78040.tar.bz2 linux-4e81120fe11e2e7f76a9e557f3ca9ab5acb78040.zip |
staging: vchiq_arm: Drop unnecessary NULL check
Looking at the handling of service instance within the VCHIQ
driver shows that it's not possible that service_callback is
called with instance is a NULL pointer. So drop the unnecessary
NULL check and fix:
vchiq_arm.c:1109 service_callback() warn:
variable dereferenced before check 'instance' (see line 1091)
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/linux-arm-kernel/202404230315.vx7ESZ3r-lkp@intel.com/
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240425165852.6681-2-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index c06232fcb0fb..297af1d80b12 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1106,7 +1106,7 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason, user_service = (struct user_service *)service->base.userdata; - if (!instance || instance->closing) { + if (instance->closing) { rcu_read_unlock(); return 0; } |