media: dvb-frontends: rtl2832_sdr: set error code in probe
If rtl2832_sdr_probe() encounters an unsupported tuner it cleans up everything and returns 0. This can result in various bad things later. The patch sets the error code on the corresponding path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
8c608272ec
commit
ce5d72b6f5
@ -1411,6 +1411,7 @@ static int rtl2832_sdr_probe(struct platform_device *pdev)
|
||||
default:
|
||||
v4l2_ctrl_handler_init(&dev->hdl, 0);
|
||||
dev_err(&pdev->dev, "Unsupported tuner\n");
|
||||
ret = -ENODEV;
|
||||
goto err_v4l2_ctrl_handler_free;
|
||||
}
|
||||
if (dev->hdl.error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user