From: Kangjie Lu <kjlu@umn.edu>
To: kjlu@umn.edu
Cc: pakki001@umn.edu, Olli Salonen <olli.salonen@iki.fi>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: tuners: fix a missing check for regmap_write_bits
Date: Sun, 24 Mar 2019 18:21:10 -0500 [thread overview]
Message-ID: <20190324232110.2804-1-kjlu@umn.edu> (raw)
regmap_write_bits could fail and thus deserves a check.
The fix returns its error code upstream in case it fails.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
drivers/media/tuners/tda18250.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/tuners/tda18250.c b/drivers/media/tuners/tda18250.c
index 20d10ef45ab6..36ede1b02d23 100644
--- a/drivers/media/tuners/tda18250.c
+++ b/drivers/media/tuners/tda18250.c
@@ -703,6 +703,8 @@ static int tda18250_set_params(struct dvb_frontend *fe)
/* charge pump */
ret = regmap_write_bits(dev->regmap, R46_CPUMP, 0x07, buf[2]);
+ if (ret)
+ goto err;
return 0;
err:
--
2.17.1
next reply other threads:[~2019-03-24 23:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 23:21 Kangjie Lu [this message]
2019-03-27 15:12 ` [PATCH] media: tuners: fix a missing check for regmap_write_bits Mukesh Ojha
2019-04-04 20:09 ` Sean Young
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=20190324232110.2804-1-kjlu@umn.edu \
--to=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=olli.salonen@iki.fi \
--cc=pakki001@umn.edu \
/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).