diff options
author | Evgeny Novikov <novikov@ispras.ru> | 2020-09-21 14:30:06 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-27 11:23:46 +0200 |
commit | ce5d72b6f5a0b694b19cd812788d8e1ea49aea21 (patch) | |
tree | 0073cb82e8c7ed9b6b420e2d373a45dd02723f2e /drivers/media | |
parent | media: cedrus: Propagate OUTPUT resolution to CAPTURE (diff) | |
download | linux-ce5d72b6f5a0b694b19cd812788d8e1ea49aea21.tar.xz linux-ce5d72b6f5a0b694b19cd812788d8e1ea49aea21.zip |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-frontends/rtl2832_sdr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c index 720756728f2d..ef6feb299d46 100644 --- a/drivers/media/dvb-frontends/rtl2832_sdr.c +++ b/drivers/media/dvb-frontends/rtl2832_sdr.c @@ -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) { |