Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpib: ni_usb: Fix the *allocate_private retval check

Change

if (retval < 0)
return retval;

into

if (retval)
return retval;

as it is more fitting in this case.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://patch.msgid.link/20260116174647.317256-22-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dominik Karol Piątkowski and committed by
Greg Kroah-Hartman
78047416 64900aa8

+1 -1
+1 -1
drivers/gpib/ni_usb/ni_usb_gpib.c
··· 2234 2234 2235 2235 mutex_lock(&ni_usb_hotplug_lock); 2236 2236 retval = ni_usb_allocate_private(board); 2237 - if (retval < 0) { 2237 + if (retval) { 2238 2238 mutex_unlock(&ni_usb_hotplug_lock); 2239 2239 return retval; 2240 2240 }