From patchwork Mon Oct 24 11:30:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10288 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp653785wru; Mon, 24 Oct 2022 14:10:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VxnnFsV+gyfFgHFWldTwUcpADYEtcsujDxFPEQjXHt9gDfPGgJi5Hod40cncL7eIQdoFd X-Received: by 2002:a17:906:1b49:b0:78d:b7b5:71cc with SMTP id p9-20020a1709061b4900b0078db7b571ccmr28918582ejg.536.1666645851506; Mon, 24 Oct 2022 14:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666645851; cv=none; d=google.com; s=arc-20160816; b=1DgFA6saoiOY4bY82RG3ryTngHyoBnmOJSTEwjojre/bP+b0uJt3/NENf7SrhD5VDV 5I5z6IG2Va8T0ovL2px/rb20Ncjy3mSQhhML4RQ6cgorSk02pKmdxi1i4DuCfm6qd6w7 1kghYMqf0O/o98yVaR1JLkmphUajReU8/jh8m64soe21pySsDsR1AmZIS5JnPWIF4nTM /38ik9bZET4iHG7rYGTPHCSn0ZSvJ1KX6+sUnDZL+Q/zi32FaMhUUTQD2IIhfGfY5MuM v4/mSyaiIcs1hccg0VGMfegYAtMN4tey3e1cnoZ5kNKR0CHeKROicqojHfCod+nqqjeA f1zQ== 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=ngXAf4wPdKw1EuRnocJjsnG6rhfsOWoj8n+PMX7xmSk=; b=UFhtIKQrQSZTJqBO9MUp+70CanC/I3G/gEnsrMpEQAScmfuBt7Wfnna9tujhsxYFnN b4r4t5ddDGITbaIUFA4hclqH7ztP/zCDscsqAzg+ZUfUPvYDPRK3arrhvrQ6+8KBxjsl E7I/bAxMq8uf8bJtdxx4T8OvkAA+rf2Qn5mejJMzf0sWq//qL72oxqzJ0sUvskulJ5QK ObtkB0K4/LYalnj30dnz78YcRsIeSLatb3CIgaXNWZapDh1naOhbtRam+2a7MEaAcnRg /gk16Vf9IXa8eWyqJ76DOWeO1ueRm7LbHg97tLQezpatjgv1GIaWUrqyvMFBz72wWqES fGag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m1C96i4i; 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 b8-20020a056402278800b00461e3e1bc3asi874267ede.317.2022.10.24.14.10.26; Mon, 24 Oct 2022 14:10:51 -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=m1C96i4i; 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 S235068AbiJXUys (ORCPT + 99 others); Mon, 24 Oct 2022 16:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235242AbiJXUxd (ORCPT ); Mon, 24 Oct 2022 16:53:33 -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 A4A4BA7AB3; Mon, 24 Oct 2022 12:00:11 -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 3BDCE61259; Mon, 24 Oct 2022 12:10:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51696C433D7; Mon, 24 Oct 2022 12:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613421; bh=mgOxfyx21Abf6dzZ0R2ImjjUuO/7RuhL89xIScdUt0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1C96i4iZZXtthMlmJl5Lwez+aY9iKNLZIwPCTpeGhX8A2zowxPS9a/f3jqBYM7bM xftQJowQnxiXbPDDY8kVJrIaw+lq8tuXuWKHwmd6mnBLrATQs3zO0aPQSpKDFV67Oo Wy+3SEIsSoXtZEYnwokZdOPQeLwaBbsCyctZAQmQ= 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.4 131/255] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:41 +0200 Message-Id: <20221024113006.929167878@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747604840247541568?= X-GMAIL-MSGID: =?utf-8?q?1747604840247541568?= 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 9bb14bb2e498..c78c2a7f03fa 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -214,6 +214,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++;