Commit 635ddb8
staging: gpib: ni_usb: Handle gpib_register_driver() errors
The usb_register() function can fail and returns an error value which
is not returned. The function gpib_register_driver() can also fail
which can result in semi-registered module.
In case gpib_register_driver() fails unregister the previous usb driver
registering function. Return the error value if gpib_register_driver()
or usb_register() functions fail. Add pr_err() statements indicating the
fail and error value.
Signed-off-by: Nihar Chaithanya <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent e3f4b64 commit 635ddb8
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2619 | 2619 | | |
2620 | 2620 | | |
2621 | 2621 | | |
| 2622 | + | |
2622 | 2623 | | |
2623 | 2624 | | |
2624 | 2625 | | |
2625 | 2626 | | |
2626 | | - | |
2627 | | - | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
2628 | 2639 | | |
2629 | 2640 | | |
2630 | 2641 | | |
| |||
0 commit comments