[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200819103631.bptd34ij3fid4ych@holly.lan>
Date: Wed, 19 Aug 2020 11:36:31 +0100
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Dinghao Liu <dinghao.liu@....edu.cn>
Cc: kjlu@....edu, Lee Jones <lee.jones@...aro.org>,
Jingoo Han <jingoohan1@...il.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Gyungoh Yoo <jack.yoo@...worksinc.com>,
Bryan Wu <cooloney@...il.com>, dri-devel@...ts.freedesktop.org,
linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: backlight: sky81452-backlight: Fix refcount
imbalance on error
On Wed, Aug 19, 2020 at 11:04:56AM +0800, Dinghao Liu wrote:
> When of_property_read_u32_array() returns an error code, a
> pairing refcount decrement is needed to keep np's refcount
> balanced.
>
> Fixes: f705806c9f355 ("backlight: Add support Skyworks SKY81452 backlight driver")
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>
> ---
> drivers/video/backlight/sky81452-backlight.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
> index 0ce181585008..8268ac43d54f 100644
> --- a/drivers/video/backlight/sky81452-backlight.c
> +++ b/drivers/video/backlight/sky81452-backlight.c
> @@ -217,6 +217,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
> num_entry);
> if (ret < 0) {
> dev_err(dev, "led-sources node is invalid.\n");
> + of_node_put(np);
> return ERR_PTR(-EINVAL);
> }
>
> --
> 2.17.1
>
Powered by blists - more mailing lists