Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6745613rwi; Mon, 24 Oct 2022 05:42:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/WbefnrP2jtYF8AoAiSVxQQqjo7zxME88GiTHrUh8uAERz9SGjD51eamN0eu6YYjkMIvG X-Received: by 2002:a05:6402:46:b0:45c:bd68:6ab0 with SMTP id f6-20020a056402004600b0045cbd686ab0mr30841446edu.16.1666615343831; Mon, 24 Oct 2022 05:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615343; cv=none; d=google.com; s=arc-20160816; b=P8pkrW9EbP0IxIYvv7FeD7MPgE1mSKs7zcKj9A39cEyGFR74aXeij8W7wqzS0etC+5 ek+aWGv+j0bt+E0/+YtDTmVdaaEgkNiMr2KjYt3GZaWzMgIr/Gtt1dG0CXkEQsM8kbY4 6Zlt0x6zHceLULs/0h4p4IVmci41LRlRI5wEJz79y28zLs1zsrpEKALVevXva6WNq6gw GF7c4ayeyDNtifBCgMdoAfSbDTljHfzKNScrn1p0hVtTVboOeYRKY/goIFhJyb3nA0pw KD672M4wEJvh/crV3NHH1HW8jMXzQDbLOKLPduRTd47QRW448O7emu2HeJYtc00zb8q9 TODQ== 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=gKBYz1ru6ufUYmfwBU02q/uuSAes05GmbIsON4Y3VWg=; b=WjyEQizX9R5zXp3OY8S9+CiXpMQIQDj/SACsvQesb4UkDn7CjjBNOqxL27HVZDzZyu JaXkQMORMXoZ/ohBTrk8CftC776hfr7cdPs/THFIx1qNwJrVNWVeE0GmHnD6W83EfnrE DIA04/wrmu0+vkWfic0eepEad7a9jf6PQ3mYGEcOU3RnvIGyxc4HAjRPXpS69RMoaxC+ k3GuE7hIz7qeWqPsTFAmX6LW910eeFIRW4SLRiTJzzMLkGYzgEe5pgW3I2zAVWHmytA8 rkit8pKJX6xHbXe9MMRgc+aHmSCLg0c5rS5dghTpswNlPHMY/ONZ757s5XrhytW1590r ICqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NJh5aa/p"; 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 k5-20020a1709062a4500b0079195ddab1bsi15231867eje.221.2022.10.24.05.41.57; Mon, 24 Oct 2022 05:42:23 -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="NJh5aa/p"; 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 S231783AbiJXLsr (ORCPT + 99 others); Mon, 24 Oct 2022 07:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbiJXLrw (ORCPT ); Mon, 24 Oct 2022 07:47:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382D21261A; Mon, 24 Oct 2022 04:43:12 -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 5E8D161278; Mon, 24 Oct 2022 11:42:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C6B9C433C1; Mon, 24 Oct 2022 11:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611749; bh=sk3x7uu1L5IV9tqR+snSyHCHx5noWd6/RU5sXL/npTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJh5aa/pUVV8xR8UDfL5FhWwuU2ovopnSdtDcz16Wq7mQMWuSgvWcoEAHvwmRgCAS r06z9ycPr3l2eUSQsmt3B08/04kB00msfspsm2xOla11/19u0uIk6MP+CqTyXZ6OSg qapjngJ3mZ9tMCeSkyx1wv4VdWzJiPg+SY3c4RlY= 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.9 097/159] media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop Date: Mon, 24 Oct 2022 13:30:51 +0200 Message-Id: <20221024112952.974352930@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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.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 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 590ec04de827..3a1311d572c2 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++; -- 2.35.1