mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
staging: gpib: Add missing mutex unlock in agilent usb driver
When no matching product id was found in the attach function the driver
returned without unlocking the agilent_82357a_hotplug_lock mutex.
Add the unlock call.
This was detected by smatch:
smatch warnings:
drivers/staging/gpib/agilent_82357a/agilent_82357a.c:1381 agilent_82357a_attach() warn: inconsistent returns 'global &agilent_82357a_hotplug_lock'.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202412210143.WJhYzXfD-lkp@intel.com/
Fixes: 4c41fe886a ("staging: gpib: Add Agilent/Keysight 82357x USB GPIB driver")
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250111161457.27556-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
95cfc75234
commit
55eb3c3a63
|
|
@ -1365,6 +1365,7 @@ static int agilent_82357a_attach(gpib_board_t *board, const gpib_board_config_t
|
|||
break;
|
||||
default:
|
||||
dev_err(&usb_dev->dev, "bug, unhandled product_id in switch?\n");
|
||||
mutex_unlock(&agilent_82357a_hotplug_lock);
|
||||
return -EIO;
|
||||
}
|
||||
#ifdef RESET_USB_CONFIG
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user