summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/drxk_hard.c
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2012-04-05 18:53:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-04-18 11:04:28 -0300
commite4459e1682c107d7ee1bf102c1ba534230e9b50b (patch)
treeba48200299a1dc1b24675b0e8355ee2119815ada /drivers/media/dvb/frontends/drxk_hard.c
parent3626479e482aa3247aac03724094ba6c13ea1e46 (diff)
downloadblackbird-op-linux-e4459e1682c107d7ee1bf102c1ba534230e9b50b.tar.gz
blackbird-op-linux-e4459e1682c107d7ee1bf102c1ba534230e9b50b.zip
[media] drxk: Does not unlock mutex if sanity check failed in scu_command()
If sanity check fails in scu_command(), goto error leads to unlock of an unheld mutex. The check should not fail in reality, but it nevertheless worth fixing. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/drxk_hard.c')
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 36d11756492f..a414b1f2b6a5 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -1520,8 +1520,10 @@ static int scu_command(struct drxk_state *state,
dprintk(1, "\n");
if ((cmd == 0) || ((parameterLen > 0) && (parameter == NULL)) ||
- ((resultLen > 0) && (result == NULL)))
- goto error;
+ ((resultLen > 0) && (result == NULL))) {
+ printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__);
+ return status;
+ }
mutex_lock(&state->mutex);
OpenPOWER on IntegriCloud