From patchwork Sat Oct 22 07:24:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1121286wrr; Sat, 22 Oct 2022 02:28:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4n/G88ZyojiCfcDfEiAR9/bOzmv4uA7oh6KghbZC6bG7poVfkErt/6G2lslykozwIGdKtN X-Received: by 2002:a17:90b:1bc9:b0:20d:b990:5028 with SMTP id oa9-20020a17090b1bc900b0020db9905028mr51508989pjb.111.1666430885764; Sat, 22 Oct 2022 02:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666430885; cv=none; d=google.com; s=arc-20160816; b=VMKkr7Kd+tP6Wyp9MfVKko+pLCkoAbQmw1ggrywMgV0rPNrKqzEE9sUv2sTZlIG20y EEiYszYdpGiR0CDrPMSjhgTcPeQN67RVIMp6j8szLRUa6Vb1yhY4n7Wt8h6NncvXb0Kh T/+eWlbTQQH0lVtFt1x3B6todSo1HQRC1hN3utjwVfN0W5Wubsm7FlXlQZ/XJczqhqgU Su3dhzfmCIKK9BvzpS995cHtXNVtBCrtJ6LqgKuCCCkFGB1dwKG7sOhXH1/ZQb/8oZNm nwynakZiGo6lbSRVPo7vlBcs+S2k1Ye20LaBY5W21vqKLkgIeVk6xx7ioZltfLzQ5hqb Crvw== 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=hwwLhRUER/Hbc51qCZ2z7Lv8XVtEnEqs7MyOVIS1IQE=; b=Z9aXccu1KLvLqnaM9CoQH8tOLI5uObe50Ii2199anlm5VZ/Y9CklCyMKMOS8PdXRqB Gwm2Q4pWGUg9+gC4M2KT054nPHU/HBIcyH8IEzczpWiKXUtETinH16dm3z1RExjI9L8N iqCiqHw4Bx/jRZIO0F11mqWXTOmQ1GGDVaqD777a3OBIPMieavTm3I4oMP5UoDXB72km X0ePQrBFMe/NMneIjK0zd7F7cOCtwTeJuFFahMPvM4krR4LQZW7cesNt6YHbz3xX4jiO ZiQT0ou07bxP9E8a+C5FA8l+sTaF+Yqgd8OqUJDIsdHWy5AStc2BPR4kihzhTuNA9TYo 1Kgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xByQgtxM; 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 c13-20020a63d14d000000b00439e032756fsi25022639pgj.65.2022.10.22.02.27.53; Sat, 22 Oct 2022 02:28:05 -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=xByQgtxM; 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 S229936AbiJVJEc (ORCPT + 99 others); Sat, 22 Oct 2022 05:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235080AbiJVJDY (ORCPT ); Sat, 22 Oct 2022 05:03:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E39842FACE1; Sat, 22 Oct 2022 01:18:31 -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 C781D60B84; Sat, 22 Oct 2022 07:53:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC0A2C433D6; Sat, 22 Oct 2022 07:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425198; bh=WTP5UwOckZbMbSXMx2VCri9AardoaYuqySbMaS2HOr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xByQgtxMxZVMgBztxVoe/uh6UpRusSxqVD+yVNqIDpJEVIsdzHZL6fPGwHqTyW77F rEHYD7zmoVXn2gHftouBo7+BdpRhAm27trw3dsHv1df9KyCb0jGdq8buryUhHylGfO btxveMjdW8JIBZOpDStj0fjM9M7BnqR3EGQgG1yo= 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.19 394/717] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Sat, 22 Oct 2022 09:24:33 +0200 Message-Id: <20221022072515.184860811@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747379432375555340?= X-GMAIL-MSGID: =?utf-8?q?1747379432375555340?= 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/samsung/exynos4-is/fimc-is.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c index e3072d69c49f..a7704ff069d6 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c +++ b/drivers/media/platform/samsung/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++;