Skip to content

Commit

Permalink
[media] dvb-core: Release semaphore on error path dvb_register_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Nayak authored and Mauro Carvalho Chehab committed Jul 6, 2012
1 parent f676fa0 commit 82163ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/dvb/dvb-core/dvbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 82163ed

Please sign in to comment.