diff options
author | Santosh Nayak <santoshprasadnayak@gmail.com> | 2012-06-23 06:59:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 11:58:20 -0400 |
commit | e49068478916ea599765112c3cf3e31c520bce5c (patch) | |
tree | 0fe2ac3ae76aa98290ecd91b27a30d4200f58918 | |
parent | 4ff1ddad40c57605cc33a78699e4559217a06a46 (diff) |
media: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 f7328777595..d5cda35dcc7 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, | |||
243 | if (minor == MAX_DVB_MINORS) { | 243 | if (minor == MAX_DVB_MINORS) { |
244 | kfree(dvbdevfops); | 244 | kfree(dvbdevfops); |
245 | kfree(dvbdev); | 245 | kfree(dvbdev); |
246 | up_write(&minor_rwsem); | ||
246 | mutex_unlock(&dvbdev_register_lock); | 247 | mutex_unlock(&dvbdev_register_lock); |
247 | return -EINVAL; | 248 | return -EINVAL; |
248 | } | 249 | } |