Commit c4c5d62c authored by Santosh Nayak's avatar Santosh Nayak Committed by Ben Hutchings

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

commit 82163edc upstream.

There is a missing "up_write()" here. Semaphore should be released
before returning error value.
Signed-off-by: default avatarSantosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent f01e43b2
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment