提交 4699b5f3 编写于 作者: L Luis Alves 提交者: Mauro Carvalho Chehab

[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: NLuis Alves <ljalvs@gmail.com>
Reviewed-by: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 3bf740bf
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册