From patchwork Mon Oct 24 11:30:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp402401wru; Mon, 24 Oct 2022 04:50:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51pqKAnVAAI+lU57a7ELj+hu4fveuwoCZOFFr6PUT9wrCD7/LmCu5SU35IOPB6nmMle1X0 X-Received: by 2002:a17:903:18d:b0:186:9862:d15f with SMTP id z13-20020a170903018d00b001869862d15fmr9032216plg.6.1666612199940; Mon, 24 Oct 2022 04:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666612199; cv=none; d=google.com; s=arc-20160816; b=rabagoAEgN6t3wESaZj4mDcViBTm/xbLd7xRP3KU67sBs/YOMvAeGvOa7X+rsSs992 PwtgXp3xKpWpoaTwR2V4/qN01jUNo8Tg0ztQwWQ+LAXl+lKF4bCUUDFO5u8EjUAt9cPi 0xig2dTCullAMx/RihXh4hEaWzYCmUwCeAeex7SyKekNnHqN1RTimKP9od66MubFNxl1 akDx9Nky7ru/o9+atNCOYAl1UBnlbwyWhqjsE9O0RxYmrst/3a0GMeK7JoJEhqBgqIFS aHw/XiB+XAeNnf9G6k2fxVx327O4A+VqJk7FlBXHEfswlzMAVdm+VfVZn2XpcMJcBiHE MdyA== 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=gKBYz1ru6ufUYmfwBU02q/uuSAes05GmbIsON4Y3VWg=; b=WjyEQizX9R5zXp3OY8S9+CiXpMQIQDj/SACsvQesb4UkDn7CjjBNOqxL27HVZDzZyu JaXkQMORMXoZ/ohBTrk8CftC776hfr7cdPs/THFIx1qNwJrVNWVeE0GmHnD6W83EfnrE DIA04/wrmu0+vkWfic0eepEad7a9jf6PQ3mYGEcOU3RnvIGyxc4HAjRPXpS69RMoaxC+ k3GuE7hIz7qeWqPsTFAmX6LW910eeFIRW4SLRiTJzzMLkGYzgEe5pgW3I2zAVWHmytA8 rkit8pKJX6xHbXe9MMRgc+aHmSCLg0c5rS5dghTpswNlPHMY/ONZ757s5XrhytW1590r ICqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NJh5aa/p"; 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 x12-20020a17090300cc00b00186ada43088si2237247plc.517.2022.10.24.04.49.46; Mon, 24 Oct 2022 04:49:59 -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="NJh5aa/p"; 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 S231783AbiJXLsr (ORCPT + 99 others); Mon, 24 Oct 2022 07:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbiJXLrw (ORCPT ); Mon, 24 Oct 2022 07:47:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382D21261A; Mon, 24 Oct 2022 04:43:12 -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 5E8D161278; Mon, 24 Oct 2022 11:42:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C6B9C433C1; Mon, 24 Oct 2022 11:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611749; bh=sk3x7uu1L5IV9tqR+snSyHCHx5noWd6/RU5sXL/npTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJh5aa/pUVV8xR8UDfL5FhWwuU2ovopnSdtDcz16Wq7mQMWuSgvWcoEAHvwmRgCAS r06z9ycPr3l2eUSQsmt3B08/04kB00msfspsm2xOla11/19u0uIk6MP+CqTyXZ6OSg qapjngJ3mZ9tMCeSkyx1wv4VdWzJiPg+SY3c4RlY= 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 4.9 097/159] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:51 +0200 Message-Id: <20221024112952.974352930@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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?1747569554087769869?= X-GMAIL-MSGID: =?utf-8?q?1747569554087769869?= 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 590ec04de827..3a1311d572c2 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -217,6 +217,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++;