Commit e121993a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 83104f04
...@@ -125,6 +125,7 @@ static int af9033_init(struct dvb_frontend *fe) ...@@ -125,6 +125,7 @@ static int af9033_init(struct dvb_frontend *fe)
if (i == ARRAY_SIZE(clock_adc_lut)) { if (i == ARRAY_SIZE(clock_adc_lut)) {
dev_err(&client->dev, "Couldn't find ADC config for clock %d\n", dev_err(&client->dev, "Couldn't find ADC config for clock %d\n",
dev->cfg.clock); dev->cfg.clock);
ret = -ENODEV;
goto err; goto err;
} }
...@@ -852,6 +853,7 @@ static int af9033_read_snr(struct dvb_frontend *fe, u16 *snr) ...@@ -852,6 +853,7 @@ static int af9033_read_snr(struct dvb_frontend *fe, u16 *snr)
*snr = *snr * 0xffff / 32; *snr = *snr * 0xffff / 32;
break; break;
default: default:
ret = -EINVAL;
goto err; goto err;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment