Commit d43f18d
staging: gpib: Add missing mutex unlock in ni usb driver
When the buffer allocation for return data in ni_usb_write() fails
we were returning without unlocking the addressed_transfer_lock.
Add the unlock call.
This was detected by smatch:
New smatch warnings:
drivers/staging/gpib/ni_usb/ni_usb_gpib.c:837 ni_usb_write() warn: inconsistent returns '&ni_priv->addressed_transfer_lock'.
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Dave Penkler <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 55eb3c3 commit d43f18d
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
| 787 | + | |
787 | 788 | | |
| 789 | + | |
788 | 790 | | |
789 | 791 | | |
790 | 792 | | |
| |||
0 commit comments