media: dvbdev: fix error logic at dvb_register_device()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 9 Jun 2021 12:32:29 +0000 (14:32 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 17 Jun 2021 07:25:31 +0000 (09:25 +0200)
commit1fec2ecc252301110e4149e6183fa70460d29674
treef46a082b5212e9020364a4652e832b7e06febdaf
parentabc0226df64dc137b48b911c1fe4319aec5891bb
media: dvbdev: fix error logic at dvb_register_device()

As reported by smatch:

drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:510 dvb_register_device() warn: '&dvbdev->list_head' not removed from list
drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:530 dvb_register_device() warn: '&dvbdev->list_head' not removed from list
drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:545 dvb_register_device() warn: '&dvbdev->list_head' not removed from list

The error logic inside dvb_register_device() doesn't remove
devices from the dvb_adapter_list in case of errors.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/dvb-core/dvbdev.c