mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
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>
This commit is contained in:
parent
64900aa878
commit
78047416f8
|
|
@ -2234,7 +2234,7 @@ static int ni_usb_attach(struct gpib_board *board, const struct gpib_board_confi
|
|||
|
||||
mutex_lock(&ni_usb_hotplug_lock);
|
||||
retval = ni_usb_allocate_private(board);
|
||||
if (retval < 0) {
|
||||
if (retval) {
|
||||
mutex_unlock(&ni_usb_hotplug_lock);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user