From: Antti Palosaari <crope@iki.fi>
To: Shuah Khan <shuah.kh@samsung.com>, m.chehab@samsung.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: em28xx - add error handling for KWORLD dvb_attach failures
Date: Sat, 12 Jul 2014 23:19:14 +0300 [thread overview]
Message-ID: <53C19842.8090308@iki.fi> (raw)
In-Reply-To: <1404938183-29535-1-git-send-email-shuah.kh@samsung.com>
Looks correct!
All the other devices, excluding those few PCTV ones I have added, has
that same bug... Deadlocks if tuner attach fails.
Reviewed-by: Antti Palosaari <crope@iki.fi>
regards
Antti
On 07/09/2014 11:36 PM, Shuah Khan wrote:
> Add error hanlding when EM2870_BOARD_KWORLD_A340 dvb_attach()
> for fe and tuner fail in em28xx_dvb_init().
>
> Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> ---
> drivers/media/usb/em28xx/em28xx-dvb.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index d381861..8314f51 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -1213,9 +1213,17 @@ static int em28xx_dvb_init(struct em28xx *dev)
> dvb->fe[0] = dvb_attach(lgdt3305_attach,
> &em2870_lgdt3304_dev,
> &dev->i2c_adap[dev->def_i2c_bus]);
> - if (dvb->fe[0] != NULL)
> - dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
> - &dev->i2c_adap[dev->def_i2c_bus], &kworld_a340_config);
> + if (!dvb->fe[0]) {
> + result = -EINVAL;
> + goto out_free;
> + }
> + if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
> + &dev->i2c_adap[dev->def_i2c_bus],
> + &kworld_a340_config)) {
> + dvb_frontend_detach(dvb->fe[0]);
> + result = -EINVAL;
> + goto out_free;
> + }
> break;
> case EM28174_BOARD_PCTV_290E:
> /* set default GPIO0 for LNA, used if GPIOLIB is undefined */
>
--
http://palosaari.fi/
prev parent reply other threads:[~2014-07-12 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 20:36 [PATCH] media: em28xx - add error handling for KWORLD dvb_attach failures Shuah Khan
2014-07-12 20:19 ` Antti Palosaari [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=53C19842.8090308@iki.fi \
--to=crope@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=shuah.kh@samsung.com \
/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.