All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>, unlisted-recipients:;
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register
Date: Sun, 05 Jan 2014 22:07:58 +0100	[thread overview]
Message-ID: <52C9C9AE.5070201@googlemail.com> (raw)
In-Reply-To: <1388923553-24827-1-git-send-email-m.chehab@samsung.com>

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>


      reply	other threads:[~2014-01-05 21:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C9C9AE.5070201@googlemail.com \
    --to=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.