From e121993ae4b5fa147d43db878108b7c6a7065e7b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 20 Jan 2021 10:09:05 +0100 Subject: [PATCH] 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/af9033.c | 2 ++ 1 file changed, 2 insertions(+) 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; } }