Commit 6a6c153
staging: gpib: Fix NULL pointer dereference in detach
When the detach function is called after a failed attach
the usb_dev initialization can cause a NULL pointer
dereference. This happens when the usb device is not found
in the attach procedure.
Remove the usb_dev variable and initialization and change the dev
in the dev_info message from the usb_dev to the gpib_dev.
Fixes: fbae709 ("staging: gpib: Update messaging and usb_device refs in agilent_usb")
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 9ed145e commit 6a6c153
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1442 | 1442 | | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | | - | |
1446 | 1445 | | |
1447 | 1446 | | |
1448 | 1447 | | |
1449 | 1448 | | |
1450 | | - | |
1451 | 1449 | | |
1452 | 1450 | | |
1453 | 1451 | | |
| |||
1459 | 1457 | | |
1460 | 1458 | | |
1461 | 1459 | | |
1462 | | - | |
| 1460 | + | |
1463 | 1461 | | |
1464 | 1462 | | |
1465 | 1463 | | |
| |||
0 commit comments