1
0
Fork 0

[media] em28xx: unregister i2c bus 0 if bus 1 fails to register

Fix the error handling logic, making it to unregister i2c bus 0, in
case of a failure to register the second bus.

Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
hifive-unleashed-5.1
Mauro Carvalho Chehab 2014-01-05 08:43:40 -03:00
parent b64f8e9adc
commit 1f0ee65a3b
1 changed files with 3 additions and 0 deletions

View File

@ -2989,6 +2989,9 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
if (retval < 0) {
em28xx_errdev("%s: em28xx_i2c_register bus 1 - error [%d]!\n",
__func__, retval);
em28xx_i2c_unregister(dev, 0);
return retval;
}
}