Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82163edc authored by Santosh Nayak's avatar Santosh Nayak Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarSantosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f676fa06
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}