From patchwork Mon Oct 24 11:30:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8589 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp419242wru; Mon, 24 Oct 2022 05:15:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5RtIcuTlGDzhcfm43GqfY/MSvM0VIspoqZhI0Af2NjWCGDdjtcsFG0Fa2iLoUdaQFgRMwM X-Received: by 2002:a17:906:d54d:b0:78e:f130:7099 with SMTP id cr13-20020a170906d54d00b0078ef1307099mr28192658ejc.142.1666613756726; Mon, 24 Oct 2022 05:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666613756; cv=none; d=google.com; s=arc-20160816; b=wsoeGRvZprSxvPgreZS9U0pWmkjn/JY+7uC+Hr4Zwha/4POzaElZ6dh+O8sX32WYGJ atBEs/NDi2FLmTjFctrsGTOagKqqntlyRT56kGVmFEjQv/JRRH6JTi6BxXhfd8DmD2WA 8TouHqwam96fEUTohANTZ1LEDbywVMmmgMOPrp6kYJQLy0C0Fk837tMDkXBI5lfnzBHg qaLVB2wgrk0tjOb1I0Pl5eFnXIvgzmjvVw7sBhVaAMTuOnoOGvqqgr0o7AYY8vFJuXx9 NH733PSxtMBlWTsPmG1DiXHap85Kvf+cXaXgPsVbIgJl9S2sP/LVCrK4mwbOKg6bNb9X cTpA== 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=OaFJ9sMGz1OKyYmNCkEBk0z+vaIFMbV5LBWj8iktb3o4q83uYZHZJC6lpcqgYQ1StO kFG11VoJ5t7JR1TsU7nDmXO9/IB5aCMRPxqh5darQGz58TzOqRmGMy2NXASYTE5/kPnQ gumstR76ejrq93PDbnlUPrDuspx/BlKwYa6RXQKAH3/ubuhenipHQYe5KaxLo7uKU8La YzYzho8kmPvu9z7HdfAEXjhWyPTK40m7QU7Yd+XbJVI5YVOU24nxIJ1qh6MtIbCR3H62 Syvt2lm5ytXDNWMRJs+P9w2ssOteU3eH0obKJG09j51dzfwmNlVdYhXwXiPAxXh0L8qo pa+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SBN33LXI; 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 hd40-20020a17090796a800b0078d3ab37efasi29033188ejc.84.2022.10.24.05.15.32; Mon, 24 Oct 2022 05:15:56 -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=SBN33LXI; 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 S230233AbiJXMHH (ORCPT + 99 others); Mon, 24 Oct 2022 08:07:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232913AbiJXMEh (ORCPT ); Mon, 24 Oct 2022 08:04:37 -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 4FB65647DE; Mon, 24 Oct 2022 04:50:59 -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 B1FAC612A8; Mon, 24 Oct 2022 11:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C24B8C4314A; Mon, 24 Oct 2022 11:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612242; bh=YqqfBLDCHIre+JSjFqMR5fczi5ijx+iG1FyyUcTV2kg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBN33LXIAJ6n8AU4aXYv2w0d+GceCdB2pTM/N8mctUF3nG5aJoqIcErxeDF5zisf3 HfC4VmPlHOHFM+S1azanSv1WtdY1VuDcGZl55SkuXPtQOUwNi8TH4G2KFtTlFFIJ2/ 2wXbx8Gf4+5ptrUjw1P5kBNd/IofHE478dYtJeek= 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.14 123/210] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:40 +0200 Message-Id: <20221024113000.967557138@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747571186276234305?= X-GMAIL-MSGID: =?utf-8?q?1747571186276234305?= 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++;