diff options
author | Santosh Nayak <santoshprasadnayak@gmail.com> | 2012-06-23 14:59:54 +0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-07-25 07:11:11 +0400 |
commit | c4c5d62cb86eedb8aa4b87b2b8ae9f2b909b0b5b (patch) | |
tree | ef9825577689df835f156d856074d4c674b0844a | |
parent | f01e43b25ec9d9b682ed5204bb9077bafdbb7abc (diff) | |
download | linux-c4c5d62cb86eedb8aa4b87b2b8ae9f2b909b0b5b.tar.xz |
dvb-core: Release semaphore on error path dvb_register_device()
commit 82163edcdfa4eb3d74516cc8e9f38dd3d039b67d upstream.
There is a missing "up_write()" here. Semaphore should be released
before returning error value.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index f73287775953..d5cda35dcc7e 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c @@ -243,6 +243,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, if (minor == MAX_DVB_MINORS) { kfree(dvbdevfops); kfree(dvbdev); + up_write(&minor_rwsem); mutex_unlock(&dvbdev_register_lock); return -EINVAL; } |