From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 12/14] dvb-frontends/af9033.c: fix missing error codes
Date: Wed, 20 Jan 2021 10:43:04 +0100 [thread overview]
Message-ID: <20210120094306.784318-13-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl>
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 --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;
}
}
--
2.29.2
next prev parent reply other threads:[~2021-01-20 10:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 9:42 [PATCH 00/14] Fixes for smatch/sparse/sysbot/compiler warnings Hans Verkuil
2021-01-20 9:42 ` [PATCH 01/14] atomisp/pci/hmm: fix wrong printk format Hans Verkuil
2021-01-20 9:42 ` [PATCH 02/14] v4l2-ctrls.c: fix shift-out-of-bounds in std_validate Hans Verkuil
2021-01-20 9:42 ` [PATCH 03/14] meson/ge2d: set ret to -ENOMEM Hans Verkuil
2021-01-20 9:42 ` [PATCH 04/14] davinci/vpbe.c: ret contains the return code, not err Hans Verkuil
2021-01-20 9:42 ` [PATCH 05/14] tuners/it913x.c: fix missing error code Hans Verkuil
2021-01-20 9:42 ` [PATCH 06/14] i2c/ov8865.c: fix error checks using wrong variable Hans Verkuil
2021-01-23 22:39 ` Sakari Ailus
2021-01-20 9:42 ` [PATCH 07/14] sti/c8sectpfe: set correct return code Hans Verkuil
2021-01-20 9:43 ` [PATCH 08/14] sti/hva: add missing clk_disable_unprepare() Hans Verkuil
2021-01-20 9:43 ` [PATCH 09/14] pci/ivtv: release memory regions on error Hans Verkuil
2021-01-20 9:43 ` [PATCH 10/14] usb/dvb-usb-v2/rtl28xxu.c: clean up code to fix smatch warning Hans Verkuil
2021-01-20 9:43 ` [PATCH 11/14] dvb-frontends/rtl2832.c: fix missing error code Hans Verkuil
2021-01-20 9:43 ` Hans Verkuil [this message]
2021-01-20 9:43 ` [PATCH 13/14] atomisp/pci: add missing include Hans Verkuil
2021-01-20 9:43 ` [PATCH 14/14] i2c/ov02a10.c: add cast to fix type mismatch Hans Verkuil
2021-01-23 22:36 ` [PATCH 00/14] Fixes for smatch/sparse/sysbot/compiler warnings Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210120094306.784318-13-hverkuil-cisco@xs4all.nl \
--to=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).