diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-01-20 12:09:05 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-27 10:38:27 +0300 |
commit | e121993ae4b5fa147d43db878108b7c6a7065e7b (patch) | |
tree | 0cc235756d2e334001dd93ddb7aba956bd7e51c7 /drivers/media/dvb-frontends/af9033.c | |
parent | 83104f045dae226ef56b1462c03b21f46d4d868f (diff) | |
download | linux-e121993ae4b5fa147d43db878108b7c6a7065e7b.tar.xz |
media: dvb-frontends/af9033.c: fix missing error codes
Fixes two smatch warnings:
drivers/media/dvb-frontends/af9033.c:128 af9033_init() warn: missing error code 'ret'
drivers/media/dvb-frontends/af9033.c:855 af9033_read_snr() warn: missing error code 'ret'
Set error codes correctly.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends/af9033.c')
-rw-r--r-- | drivers/media/dvb-frontends/af9033.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 6a8d78b6edac..785c49b3d307 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c @@ -125,6 +125,7 @@ static int af9033_init(struct dvb_frontend *fe) if (i == ARRAY_SIZE(clock_adc_lut)) { dev_err(&client->dev, "Couldn't find ADC config for clock %d\n", dev->cfg.clock); + ret = -ENODEV; goto err; } @@ -852,6 +853,7 @@ static int af9033_read_snr(struct dvb_frontend *fe, u16 *snr) *snr = *snr * 0xffff / 32; break; default: + ret = -EINVAL; goto err; } } |