From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93C6AC433DF for ; Mon, 29 Jun 2020 21:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BE9520702 for ; Mon, 29 Jun 2020 21:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593465319; bh=WbLLflRH1kjA+aX3PDTiByYeTImPHtnDXacasBWp4V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VFMvKGxBB5Aht1tTMNu2+mjTfXewLR20TKtg0gZIiWhaxdKhw9psfiJMbnHqyJVER 1DV6xkj5OOVZsctXmcCkMn5uQiCK4x4b4TZ1oeW8UKQAe2+vVoeYNnVURtdgQsjKwZ /jXttq1p9HF7DajApCFLf7nHmJ5SBGuE1dN7qqYs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390565AbgF2VPS (ORCPT ); Mon, 29 Jun 2020 17:15:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:42436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729956AbgF2SzQ (ORCPT ); Mon, 29 Jun 2020 14:55:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 52B742555D; Mon, 29 Jun 2020 15:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593446122; bh=WbLLflRH1kjA+aX3PDTiByYeTImPHtnDXacasBWp4V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MkmWNwNFvBtUC0kDeLW4z9CJT5chbEmGAHhpfyCWukVMpk6kL1Uvu8OHfWqae9l9S xHbN86C7PKWJR75U9IV914fAREClw06soTN3CeNsSRJTXIG94fBdS1PSK6u+1S/ySX l16SSUiQSMSUbiPxDVWNvfIhAr6swywwe2zXflPo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: yu kuai , Shawn Guo , Sasha Levin Subject: [PATCH 4.4 113/135] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() Date: Mon, 29 Jun 2020 11:52:47 -0400 Message-Id: <20200629155309.2495516-114-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629155309.2495516-1-sashal@kernel.org> References: <20200629155309.2495516-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.229-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.229-rc1 X-KernelTest-Deadline: 2020-07-01T15:53+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: yu kuai [ Upstream commit 586745f1598ccf71b0a5a6df2222dee0a865954e ] if of_find_device_by_node() succeed, imx_suspend_alloc_ocram() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 1579c7b9fe01 ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.") Signed-off-by: yu kuai Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm/mach-imx/pm-imx5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index 532d4b08276dc..fd996187fc5fb 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c @@ -301,14 +301,14 @@ static int __init imx_suspend_alloc_ocram( if (!ocram_pool) { pr_warn("%s: ocram pool unavailable!\n", __func__); ret = -ENODEV; - goto put_node; + goto put_device; } ocram_base = gen_pool_alloc(ocram_pool, size); if (!ocram_base) { pr_warn("%s: unable to alloc ocram!\n", __func__); ret = -ENOMEM; - goto put_node; + goto put_device; } phys = gen_pool_virt_to_phys(ocram_pool, ocram_base); @@ -318,6 +318,8 @@ static int __init imx_suspend_alloc_ocram( if (virt_out) *virt_out = virt; +put_device: + put_device(&pdev->dev); put_node: of_node_put(node); -- 2.25.1