From patchwork Mon Oct 24 11:30:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp430901wru; Mon, 24 Oct 2022 05:42:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jcSucWXZffQeo0BRmIjkDr5YBvmcTNqsGWHRALtxx+Y5kHzS4PaYPiWfWZmVMqmIiaEg+ X-Received: by 2002:a17:906:4fcb:b0:791:9a26:376f with SMTP id i11-20020a1709064fcb00b007919a26376fmr27492296ejw.431.1666615339639; Mon, 24 Oct 2022 05:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615339; cv=none; d=google.com; s=arc-20160816; b=hrZd1NHtv4k6tor9FXs51QCQ3r74sgzy3JkURA8f9pQPLx7DW65CGQrAdDn4XwWdyP QUannFKZ2q4yeuf+wGvu01edc5+ihSvxPaOfFA49VZFkgpRIBXOpEE9Z1bUegtQMsDN3 pKnQ+QJIvrZKWhodM+hcieGbzcVja07gmxlB/DykYr9o0FoYAIQ4LXsTvB3B79iBO0Qt n9K3rI26TILIvWF6DV1oDxoEtUWtxUZYaeXZRMPto6L0YT5ci6Fn6AFL/9plU0OEzfKu O5/mR8Tgs+b0ulUAVq2HHdboshXjHkJqxfz9hQPcWZprgpGwxG+2ftWw0XGVLkZ/jP6N Bqwg== 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=Lc9ofEiR9m3b8fsinSHyN+EfZUaecut0dTHXtVdUmFg=; b=GhsATi+cJGVmke/gcQSyFHXaclmyg3Xhy9R0RFV4maGVtgQumWyAMYOY+kXPD+YPF2 5OL+2v2bzLDnsErDW9sFnHgcOFiKCxyB1bxzH61DcuB3OhQEw6ASW6Kct9tfAXgSXDZt nfqnI+AUdeYzk9ZnVAgDTRTB3l6mgP2efe/de6AurfT+OaPW3FDjoa+4cghj6Biv1M6V qmqfq3aM7ENYDQNtLm2BNBYaZyf9vhkL32B5AXwxOK+Tr6/ehGWQthCacIwOS9WQ1thn f2L/tQIy0jiDpU+7rAP4nFWVC1E/m4RyCz/Rlbw+Bh8YIaTWEUlu8gNW9Osa02IUq7g2 DeJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WVqE6JYZ; 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 n14-20020aa7c78e000000b00458ee128628si23638722eds.470.2022.10.24.05.41.54; Mon, 24 Oct 2022 05:42:19 -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=WVqE6JYZ; 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 S233776AbiJXMba (ORCPT + 99 others); Mon, 24 Oct 2022 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233913AbiJXM2j (ORCPT ); Mon, 24 Oct 2022 08:28:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D6F586833; Mon, 24 Oct 2022 05:02:15 -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 A966961252; Mon, 24 Oct 2022 12:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD10EC433C1; Mon, 24 Oct 2022 12:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612809; bh=YqqfBLDCHIre+JSjFqMR5fczi5ijx+iG1FyyUcTV2kg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVqE6JYZYPPIuk9mUKlyFomUtVMjtR+rmUaZFUlWW5/XJM296uDYLNfwCN9UKQeR9 PTptuqLZU6xmzWfYUGfiOV/qAG6+MUb+SAPT1ABczbhEQQbFHhdcA/+Ld3pPVAAsCc QSx53sl2qifZ+0w0Lk7mrDKRz7tcttaV3ljiIW/M= 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.19 128/229] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:47 +0200 Message-Id: <20221024113003.147757617@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747572846731295389?= X-GMAIL-MSGID: =?utf-8?q?1747572846731295389?= 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 0f3f82bd4d20..6f59fe02c727 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++;