* [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register
@ 2014-01-05 12:05 Mauro Carvalho Chehab
2014-01-05 21:07 ` Frank Schäfer
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2014-01-05 12:05 UTC (permalink / raw)
Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
Mauro Carvalho Chehab
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>
---
drivers/media/usb/em28xx/em28xx-cards.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 541de6df127b..dbce4dc421f9 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -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;
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register
2014-01-05 12:05 [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register Mauro Carvalho Chehab
@ 2014-01-05 21:07 ` Frank Schäfer
0 siblings, 0 replies; 2+ messages in thread
From: Frank Schäfer @ 2014-01-05 21:07 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab
Am 05.01.2014 13:05, schrieb Mauro Carvalho Chehab:
> 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>
> ---
> drivers/media/usb/em28xx/em28xx-cards.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index 541de6df127b..dbce4dc421f9 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -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;
> }
> }
Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-05 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-05 12:05 [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register Mauro Carvalho Chehab
2014-01-05 21:07 ` Frank Schäfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).