diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2012-04-05 18:53:20 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 10:16:37 -0700 |
commit | 6b26bf1374ee7fbb615e0c7a80b04e573a7584f0 (patch) | |
tree | 41816d277c9b3dc8a0f751d2a77728d9c58a8d74 /drivers | |
parent | 732ecb92a61ff21a18397dfa749aa7575065f6f4 (diff) |
media: drxk: Does not unlock mutex if sanity check failed in scu_command()
commit e4459e1682c107d7ee1bf102c1ba534230e9b50b upstream.
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.c | 6 |
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 6980ed7b878..3cce362d0a6 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c @@ -1525,8 +1525,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); |