From patchwork Mon Oct 24 11:30:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp456438wru; Mon, 24 Oct 2022 06:34:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5gmieq6L5CfwYtogfUsyh5KjsxwFYc3ZFNEV/ujSW1cVf4NOWO/bzVF2FKGl5gpvj5VFeJ X-Received: by 2002:a05:6a00:1a44:b0:52a:ecd5:bbef with SMTP id h4-20020a056a001a4400b0052aecd5bbefmr33105974pfv.28.1666618451631; Mon, 24 Oct 2022 06:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618451; cv=none; d=google.com; s=arc-20160816; b=QEFpIN0ndfGS9QgZanESY6r6ZW/LbgfBBbOgMauwicOdfvWBkN1Oy3J+nyFGHEqp9V 7TmhH4JvUwotgVFXjr0N7OSP4O7MJb1s81om4ueV21DFriPhiCGw3xiqUeG3WD5OccPH bo56WnygfEnbT/nqRY3tgiuMP4Ge8QgcAbw5bPTbP6DPkxW7+Fd51T/UQoM9Q0N7ovgA HZUdcUcivNLf+rr3QQO9rfIqPphkWvHhQJD5jsz2DlPV4Xpkoi0OG7YQaVenvKSxHjmf ajrKj+nohWCZ1L9kD+u+U6Qdp92Egc1KP/l4srMUVG9GKwEktDgrn4EcWpZYKOr4higt hABA== 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=i0k2Vmb6o83as9jEQxadMrmqK6a10rNAgKxQbBK9tp4=; b=FHJnaqGWtJL+xWjtdPUzGqNgsKncuISu0pFOrcYCV6jBg/Ary6QwPe16X6SKL31H+U J8zcaJXDFagIdvuYb4rPAk3RpIG6lQ70ARt8WsqisdOVpMvwvoSA1oTr2i0gvTbj3Q92 DVF/hssWHfD7bcDCEHDds7Cmtlm2GXw1De5GAHjjTpPcVGhpRdUY1YwgCuee3w3Ao5HV Lb2GvAeLHdB4aUhzw+SzlHnZLv3tZ+DaeUIQPL3NZ/hhE8Xdrrdo5E61VX2r2JjkwnlA iKVwufFyHGZNegD087gbM5+vd9q8L96PST760cF5/7PDdQ+3+QlqlpLfK9CRRNqtkPNp rLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XclhKWIj; 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 l7-20020a170903120700b00178a33f89f1si38130980plh.267.2022.10.24.06.33.52; Mon, 24 Oct 2022 06:34:11 -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=XclhKWIj; 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 S235924AbiJXNVQ (ORCPT + 99 others); Mon, 24 Oct 2022 09:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236272AbiJXNTp (ORCPT ); Mon, 24 Oct 2022 09:19:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D5E484E6E; Mon, 24 Oct 2022 05:28:35 -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 A8798612E7; Mon, 24 Oct 2022 12:24:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B18C4C433C1; Mon, 24 Oct 2022 12:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614295; bh=xnezvrP/hKkBp2MwA9j44y/EoiumJaeOfO3sR5XKtVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XclhKWIjRKZHnMWNr9aBKqgtaRtmqiwD1ygh7gUYZj/hnjoasGg5XH9JFwWaEkhyO H7v7HPP/ZTjqEO80D/EIb+/MCyaE+IYmUI29IoIy9duasbNaF04Vdhxr0vwH0tUPYQ Zcs+cpv9dx5LQ02AjIONKoVI5arK2eav87cvS8Dk= 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 5.10 206/390] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:03 +0200 Message-Id: <20221024113031.541577286@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747576109467722182?= X-GMAIL-MSGID: =?utf-8?q?1747576109467722182?= 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/exynos4-is/fimc-is.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index dc2a144cd29b..b52d2203eac5 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/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++;