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>
This commit is contained in:
Hans Verkuil 2021-01-20 10:09:05 +01:00 committed by Mauro Carvalho Chehab
parent 83104f045d
commit e121993ae4

View File

@ -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;
}
}