From patchwork Wed Oct 19 08:29:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp223849wrs; Wed, 19 Oct 2022 02:38:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FrY9wF1VjKQDPV4ULpB0QWdsSP7g3p5agwzF0l+R21yDDn35GTScWM5ZxQb2pJVk7iFTs X-Received: by 2002:a17:906:4bd3:b0:731:3bdf:b95c with SMTP id x19-20020a1709064bd300b007313bdfb95cmr5952604ejv.677.1666172320491; Wed, 19 Oct 2022 02:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172320; cv=none; d=google.com; s=arc-20160816; b=TENHjH1Z+Q0TckiuKNjIamuaMxShVhsSaVZPfa4HlP2zWQwifOqW7GWx3pSWuogAcA 4+0tNb24VIbCfwdwLaNxgRF3WXN4YhUk6tFGe1L42PEKWoiv0BHhU/IPNEMU3CiR3l7n PmJ6S/g+N+2EOU0FVVxM1PtVHoEXr/ivk76/PVw1RdnlqJ3T5YR2FO8vGMN6tdxTQW2C WkDHf3GnRbPbfeJF3RsNQL8W+TOifg8CnyVhTeRa6jWzpCru4NtIskhF7N5sXhHWmKyG UnGx6ERTOmXOFBoYSlJV1GLrcjQ21Bhtj5Vs1OIRTZWCZr9QFQJmQ11ub0Ch8dAGfKJx B0rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hwwLhRUER/Hbc51qCZ2z7Lv8XVtEnEqs7MyOVIS1IQE=; b=fUZlMAk09Nx3EU4H1bPCGLPX1ItLGbczmWpZkkjPNDBgvmXkVt90DUpbWWHe2RZnF1 2X3gfp/0smv/xDFiP0MlPoh75x6u7vgnfkDlA0LQpjDZc1yxSsdl0E3Pkbn7qCGSt7dn ufRzgGvE3e1VT35mY5TSqPLVJ/VNjbkbgnzxdWeoxQ4NyRJd5JZ1YKy2jyUzsqs5unWn 7ncVH6MTCJwCtPeMeyRNriBnKEses8TsRumv4ab7VsSV1tbb8zykKzu5XwcLgS4yx5Vh ynT0e5UOvUjMI0swquVEYZaeBlYMmV7BEJvvWwVyVMCzwbPot4+wcmeGKFAxLP4mEo/7 ujBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xj0BKNVM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056402511300b00458b9b7bb2fsi16839576edd.396.2022.10.19.02.38.16; Wed, 19 Oct 2022 02:38:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xj0BKNVM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233620AbiJSJ1u (ORCPT + 99 others); Wed, 19 Oct 2022 05:27:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233567AbiJSJ0d (ORCPT ); Wed, 19 Oct 2022 05:26:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F4133E22F6; Wed, 19 Oct 2022 02:11:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 50151617FB; Wed, 19 Oct 2022 09:01:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F4EBC433B5; Wed, 19 Oct 2022 09:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170085; bh=WTP5UwOckZbMbSXMx2VCri9AardoaYuqySbMaS2HOr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xj0BKNVM/LLsrBUyqYWo74P1mlxiC8QfCkcy6ZhhmcDf83zoDMt3zcp0m7sy+C3Up nXlKV8XLtxCvwJ+bukYgKu+pKkF8+EMculhga1QFbX62I2JCw9HF2/T67bRDD+tLgR xeCkKveYr9HsSzerjqsrlzkO0aHj8jsizEi9/A9c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.0 485/862] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Wed, 19 Oct 2022 10:29:32 +0200 Message-Id: <20221019083311.396519600@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108307058912948?= X-GMAIL-MSGID: =?utf-8?q?1747108307058912948?= From: Liang He [ 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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++;