Skip to content

Commit 4e81120

Browse files
lategoodbyegregkh
authored andcommitted
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>
1 parent a0e244e commit 4e81120

File tree

1 file changed

+1
-1
lines changed
  • drivers/staging/vc04_services/interface/vchiq_arm

1 file changed

+1
-1
lines changed

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ service_callback(struct vchiq_instance *instance, enum vchiq_reason reason,
11061106

11071107
user_service = (struct user_service *)service->base.userdata;
11081108

1109-
if (!instance || instance->closing) {
1109+
if (instance->closing) {
11101110
rcu_read_unlock();
11111111
return 0;
11121112
}

0 commit comments

Comments
 (0)