diff mbox series

[12/14] dvb-frontends/af9033.c: fix missing error codes

Message ID 20210120094306.784318-13-hverkuil-cisco@xs4all.nl
State Accepted
Commit e121993ae4b5fa147d43db878108b7c6a7065e7b
Headers show
Series Fixes for smatch/sparse/sysbot/compiler warnings | expand

Commit Message

Hans Verkuil Jan. 20, 2021, 9:43 a.m. UTC
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>
---
 drivers/media/dvb-frontends/af9033.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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