Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3934377rwi; Sat, 22 Oct 2022 02:28:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Y6GYYfVMagqjJi0+E5oN3UTkqrgswpvvtb6XooGj6XfqFcI0jscH+T6PayxEO6qHAI8AO X-Received: by 2002:a17:902:d2cf:b0:185:4bbd:1970 with SMTP id n15-20020a170902d2cf00b001854bbd1970mr23715126plc.88.1666430912005; Sat, 22 Oct 2022 02:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666430911; cv=none; d=google.com; s=arc-20160816; b=JD7z11BlKYWqpITQRnpHjlhvb3GPm6F9889oSTojXuHZGy49cHqH0sfpDC1LXuC0va QHcHtJaXW+Ww5IpLHnmEoAr1Q7FqH+pcSFBThbC9acA6HwbxGFbMPdrBVDlOwFr04irI Tn65Sk62WxGlw/twTUfwBoccGlZ/Lknqk8Pp4mdOe+/rL+Nhql6KRblPv/Qch7WrxU8q EcNDNztw/aaE6XJ684KmBS21nUcQwQQEFtWqQ0NOuxOA+CtGNRcizCWIOB7mjo18PXHI h9rpo0JeomBFLTvxVn5qZNxAqnVm7r5zPSR37VbKKdG21o2S54aRaL94g8wxPJtzKRBM BsbQ== 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 Return-Path: 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.28.19; Sat, 22 Oct 2022 02:28:31 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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++; -- 2.35.1