dect
/
linux-2.6
Archived
13
0
Fork 0

[media] dvb-core: Release semaphore on error path dvb_register_device()

There is a missing "up_write()" here. Semaphore should be released
before returning error value.

Cc: stable@kernel.org
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Santosh Nayak 2012-06-23 07:59:54 -03:00 committed by Mauro Carvalho Chehab
parent f676fa0688
commit 82163edcdf
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}