media: dvbdev: remove double-unlock
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 28 Mar 2019 18:36:14 +0000 (14:36 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 28 Mar 2019 18:36:14 +0000 (14:36 -0400)
As warned by smatch:
drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:529 dvb_register_device() error: double unlock 'sem:&minor_rwsem'

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/dvb-core/dvbdev.c

index 4a5834a1c3b728663d9ce8f1492f9b69435dd51a..a3393cd4e584f48ee2d07eb11d7edd729aaeee52 100644 (file)
@@ -526,7 +526,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
                dvb_media_device_free(dvbdev);
                kfree(dvbdevfops);
                kfree(dvbdev);
-               up_write(&minor_rwsem);
                mutex_unlock(&dvbdev_register_lock);
                return ret;
        }