Message ID | 20210120094306.784318-12-hverkuil-cisco@xs4all.nl |
---|---|
State | Accepted |
Commit | 83104f045dae226ef56b1462c03b21f46d4d868f |
Headers | show |
Series | Fixes for smatch/sparse/sysbot/compiler warnings | expand |
diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index 01dcc7f1b9b2..dcbeb9f5e12a 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c @@ -698,6 +698,7 @@ static int rtl2832_read_status(struct dvb_frontend *fe, enum fe_status *status) goto err; constellation = (u8tmp >> 2) & 0x03; /* [3:2] */ + ret = -EINVAL; if (constellation > CONSTELLATION_NUM - 1) goto err;
Fixes this smatch warning: drivers/media/dvb-frontends/rtl2832.c:702 rtl2832_read_status() warn: missing error code 'ret' 'ret' is indeed not set, so set it to -EINVAL so a proper error code is returned. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- drivers/media/dvb-frontends/rtl2832.c | 1 + 1 file changed, 1 insertion(+)