Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp327954qtb; Wed, 19 Oct 2022 03:05:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zbqVhtmBl7dNMi+hXubgPYMOZz8t+k5SIPA2llLwgLGZt+XR+oKR0xgjHA6DG5Ccbq1I7 X-Received: by 2002:a05:6402:3641:b0:45c:4231:ddcc with SMTP id em1-20020a056402364100b0045c4231ddccmr6606906edb.224.1666173929586; Wed, 19 Oct 2022 03:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666173929; cv=none; d=google.com; s=arc-20160816; b=VaB8ixftmWOP9dtVnjpmN+wQ7mbe7p4ralUP9USaIgshKpqlIj141qmBTUd7KDf7Xq A8DLjFes3Fx9CZdw+g/EMJyUPqqWqbkmUsSXeTxnQTQcpgocN4YmmqEi6sdYiLwqR6Wc XZxmlcprL/GxiHYb20b6Ly2DJ81G5rArIVtrlKB159b6x9kJx//Z+wir1ZMx0hvAeK7m mA70GM9O+cL0kE6rrzWWfwwpT1/QV0f3yIMYZPA3qADGS3RIWLQHfy8KwdBTqYkHfDGB ULADokDFrYUQvOgpWMQIZ9xaYAKOf5RFZEWfOdnc+wAsQ/ImGktTHE2OWzi7qIqlxM5c GW3A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020a170906441400b0078a00ad1e31si13101291ejo.687.2022.10.19.03.05.03; Wed, 19 Oct 2022 03:05:29 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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++; -- 2.35.1