lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] media: tuners: fix a missing check for regmap_write_bits
From
Date

On 3/25/2019 4:51 AM, Kangjie Lu wrote:
> 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>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

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

\
 
 \ /
  Last update: 2019-03-27 16:12    [W:0.060 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site