Patch "backlight: sky81452-backlight: Fix refcount imbalance on error" has been added to the 5.9-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    backlight: sky81452-backlight: Fix refcount imbalance on error

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     backlight-sky81452-backlight-fix-refcount-imbalance-.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4469e3beaefc680323497ddf7088cdf59bb10321
Author: dinghao.liu@xxxxxxxxxx <dinghao.liu@xxxxxxxxxx>
Date:   Thu Aug 20 14:38:17 2020 +0800

    backlight: sky81452-backlight: Fix refcount imbalance on error
    
    [ Upstream commit b7a4f80bc316a56d6ec8750e93e66f42431ed960 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
    Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
index 0ce1815850080..8268ac43d54f7 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);
 		}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux