Re: [PATCH] media: tuners: fix a missing check for regmap_write_bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux