diff options
Diffstat (limited to 'drivers/usb/misc/usb3503.c')
-rw-r--r-- | drivers/usb/misc/usb3503.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c index 48099c6bf04c..330f494cd158 100644 --- a/drivers/usb/misc/usb3503.c +++ b/drivers/usb/misc/usb3503.c @@ -409,13 +409,18 @@ static int __init usb3503_init(void) int err; err = i2c_add_driver(&usb3503_i2c_driver); - if (err != 0) + if (err) { pr_err("usb3503: Failed to register I2C driver: %d\n", err); + return err; + } err = platform_driver_register(&usb3503_platform_driver); - if (err != 0) + if (err) { pr_err("usb3503: Failed to register platform driver: %d\n", err); + i2c_del_driver(&usb3503_i2c_driver); + return err; + } return 0; } |