lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6.0 485/862] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
    Date
    From: Liang He <windhl@126.com>

    [ Upstream commit 211f8304fa21aaedc2c247f0c9d6c7f1aaa61ad7 ]

    In fimc_is_register_subdevs(), we need to call of_node_put() for
    the reference 'i2c_bus' when breaking out of the
    for_each_compatible_node() which has increased the refcount.

    Fixes: 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver")
    Signed-off-by: Liang He <windhl@126.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/media/platform/samsung/exynos4-is/fimc-is.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
    index e3072d69c49f..a7704ff069d6 100644
    --- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c
    +++ b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
    @@ -213,6 +213,7 @@ static int fimc_is_register_subdevs(struct fimc_is *is)

    if (ret < 0 || index >= FIMC_IS_SENSORS_NUM) {
    of_node_put(child);
    + of_node_put(i2c_bus);
    return ret;
    }
    index++;
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-10-19 11:32    [W:4.026 / U:0.964 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site