This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-dvb.git tree:
Subject: V4L/DVB: tda18271: fix error detection during initialization of first instance Author: Michael Krufky <[email protected]> Date: Mon May 3 02:10:15 2010 -0300 Fix error detection of failures during initialization of first instance: Dont pass a function into the tda_fail macro. Instead, save the function return value and pass that into the tda_fail macro. This prevents the function from being called twice in cases of failure, for example: [19026.074070] tuner 4-0060: chip found @ 0xc0 (device #0) [19026.087755] tda18271 4-0060: creating new instance [19026.089965] Unknown device detected @ 4-0060, device not supported. [19026.092233] Unknown device detected @ 4-0060, device not supported. [19026.092241] tda18271_attach: [4-0060|M] error -22 on line 1275 [19026.092327] tda18271 4-0060: destroying instance Signed-off-by: Michael Krufky <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/common/tuners/tda18271-fe.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=2ef0d9113ea1810538e105a6b499deb8742cebba diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c index b2e1545..7955e49 100644 --- a/drivers/media/common/tuners/tda18271-fe.c +++ b/drivers/media/common/tuners/tda18271-fe.c @@ -1249,7 +1249,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, struct tda18271_config *cfg) { struct tda18271_priv *priv = NULL; - int instance; + int instance, ret; mutex_lock(&tda18271_list_mutex); @@ -1268,10 +1268,12 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, priv->cal_initialized = false; mutex_init(&priv->lock); - if (tda_fail(tda18271_get_id(fe))) + ret = tda18271_get_id(fe); + if (tda_fail(ret)) goto fail; - if (tda_fail(tda18271_assign_map_layout(fe))) + ret = tda18271_assign_map_layout(fe); + if (tda_fail(ret)) goto fail; mutex_lock(&priv->lock); _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
