Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp965007pxb; Wed, 6 Apr 2022 05:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZulzo40rl5lVev7vMMDsm07XAEnGXVmVpkOy/uLp1ZPiBNiWaKv+InIAiVCgdT8lv8lox X-Received: by 2002:a65:5b84:0:b0:398:fd62:6497 with SMTP id i4-20020a655b84000000b00398fd626497mr6810472pgr.179.1649248208487; Wed, 06 Apr 2022 05:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649248208; cv=none; d=google.com; s=arc-20160816; b=tt36vTBIPF+cy+nksLlsLmeTITh7+NFQT0NGMCxjmigcXeif6obUMTwqtQLRU1q3CZ E8T8Vd82beU07KqZsLOarPAcFzLsG9um7sCmwQcPuu84ZRCa5R7IMo3m8Kl6COSXlQuY gwZI3+Zz9KQ9jux6mDzQbl1kdx7YENjlRxqjwb/zcGSfBtiF2TjwD533DHI6PYCV93sg 5snxu3VjHC7A0qcbtFq5CbF/gH2eogxEEGXkyyzmOgAQJVx4lmvrt/zkMwQbIlagBqUM Aqeu5ioqriOiFSuv5yQ/czB7igQijpsbCBNIY0DeDS/xrm1N/tP5aMPMpXSAKhtM36V5 aDZg== 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=OLRHyoZlujCsy1j4U0uVnR2StLLhx4ObFOyM0JrMaTI=; b=EEIFZ1pEbEULnEw3SmoCKJooMBMbEbIuNmUdrFE1mwgtgQs7f86+fActt4PDc5J+Sg 5LGEmO8WegCT5V3ZSWlQa1+r8PmZEqZYz5HM1N5H9Pm1DUePXOSjsfhfuH9sgvsyMV/+ L85GdJxuZZaH6lYYOU7pL8DETjm46r3LmD44vw8F9dQMvEZVWW0ML1bra+DXrFiI0Q+4 KCMR0fy0PdgbMOqImXhgSh3tfO3XI90rK/kA15lHm03awqtDmQ2UZNzczarg4vls08T0 4XymAQWUCHANePnzbppMhzoDagJHUEK8+B2AQjyh+R8qLyhH3uWwuVOEdRGvar9kQ4Td g0Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=txw8fgVB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j1-20020a635501000000b003817d61f02csi15780915pgb.624.2022.04.06.05.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:30:08 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=txw8fgVB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D492B515F98; Wed, 6 Apr 2022 02:05:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838978AbiDFA5l (ORCPT + 99 others); Tue, 5 Apr 2022 20:57:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349636AbiDEJuo (ORCPT ); Tue, 5 Apr 2022 05:50:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5054625C6; Tue, 5 Apr 2022 02:48:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0D1ACB818F3; Tue, 5 Apr 2022 09:48:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C46EC385A2; Tue, 5 Apr 2022 09:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152122; bh=yOnrRwd70HwVw1bIn+rMWuD5SkqY4anC+MBl/7166lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=txw8fgVBYxr+7XpS3Z1/Ty4BiG6f0OCFEC3M1eXDTRaPBVHTDcQpLLXS3mCTdtD6k F9vtkekOis4sSu+OmoMFduAAkeR/cJPu+W/h8EVPFzXoS86LhrCV8b97FI9o3mRbx5 iM3e/P3/iCLd86ItlGxqHCUVrlUCqGkMXh5wMRlo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Thierry Reding , Stephen Boyd , Sasha Levin Subject: [PATCH 5.15 624/913] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver Date: Tue, 5 Apr 2022 09:28:06 +0200 Message-Id: <20220405070358.544089090@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Miaoqian Lin [ Upstream commit 6d6ef58c2470da85a99119f74d34216c8074b9f0 ] The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add the corresponding 'put_device()' in the error handling path. Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver") Signed-off-by: Miaoqian Lin Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20220112104501.30655-1-linmq006@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/tegra/clk-tegra124-emc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c index 74c1d894cca8..219c80653dbd 100644 --- a/drivers/clk/tegra/clk-tegra124-emc.c +++ b/drivers/clk/tegra/clk-tegra124-emc.c @@ -198,6 +198,7 @@ static struct tegra_emc *emc_ensure_emc_driver(struct tegra_clk_emc *tegra) tegra->emc = platform_get_drvdata(pdev); if (!tegra->emc) { + put_device(&pdev->dev); pr_err("%s: cannot find EMC driver\n", __func__); return NULL; } -- 2.34.1