summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLuis Alves <ljalvs@gmail.com>2013-10-04 11:48:11 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-10-14 06:38:56 -0300
commit4699b5f34a09e6fcc006567876b0c3d35a188c62 (patch)
tree8a111a3c0db935633918846c9af661e0335180af /drivers
parent3bf740bf8d4258e1e22176761663cf298518def3 (diff)
[media] cx24117: prevent mutex to be stuck on locked state if FE init fails
This patch will fix the situation where the mutex was left in a locked state if for some reason the FE init failed. Signed-off-by: Luis Alves <ljalvs@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-frontends/cx24117.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c
index 908730959e38..476b422ccf19 100644
--- a/drivers/media/dvb-frontends/cx24117.c
+++ b/drivers/media/dvb-frontends/cx24117.c
@@ -1238,11 +1238,11 @@ static int cx24117_initfe(struct dvb_frontend *fe)
cmd.len = 3;
ret = cx24117_cmd_execute_nolock(fe, &cmd);
if (ret != 0)
- return ret;
+ goto exit;
ret = cx24117_diseqc_init(fe);
if (ret != 0)
- return ret;
+ goto exit;
/* CMD 3C */
cmd.args[0] = 0x3c;
@@ -1252,7 +1252,7 @@ static int cx24117_initfe(struct dvb_frontend *fe)
cmd.len = 4;
ret = cx24117_cmd_execute_nolock(fe, &cmd);
if (ret != 0)
- return ret;
+ goto exit;
/* CMD 34 */
cmd.args[0] = 0x34;
@@ -1260,9 +1260,8 @@ static int cx24117_initfe(struct dvb_frontend *fe)
cmd.args[2] = CX24117_OCC;
cmd.len = 3;
ret = cx24117_cmd_execute_nolock(fe, &cmd);
- if (ret != 0)
- return ret;
+exit:
mutex_unlock(&state->priv->fe_lock);
return ret;