mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Kangjie Lu <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: Re: [PATCH] media: tuners: fix a missing check for regmap_write_bits
Date: Thu, 4 Apr 2019 21:09:08 +0100	[thread overview]
Message-ID: <20190404200907.3fet563fmagpdh6w@gofer.mess.org> (raw)
In-Reply-To: <20190324232110.2804-1-kjlu@umn.edu>

On Sun, Mar 24, 2019 at 06:21:10PM -0500, Kangjie Lu wrote:
> regmap_write_bits could fail and thus deserves a check.
> 
> The fix returns its error code upstream in case it fails.

Has this been tested on real hardware?

Sean

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

      parent reply	other threads:[~2019-04-04 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 23:21 Kangjie Lu
2019-03-27 15:12 ` Mukesh Ojha
2019-04-04 20:09 ` Sean Young [this message]

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=20190404200907.3fet563fmagpdh6w@gofer.mess.org \
    --to=sean@mess.org \
    --cc=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

all inboxes | Powered by JetHome®