From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1989881F for ; Fri, 10 Mar 2023 14:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 285DEC4339B; Fri, 10 Mar 2023 14:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678459584; bh=LDaJy4Bc+2oN7kq7ywF7BTVGjXNnKd1/9uCRA+fMpds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1DPVeFU1ykJFHvP+VIxB1cIJ91yCjDovgq9dPAl54yRWnp2BMlxVqlq+VIQFVAMya k+W7K89nOZs2nyP5SESKnlkXuxn20SsQNDTy0YOO2MGdB3wLcbV0sEdOaKGfVqj22q Bxk0dto8IN+cQ2+9saYpdYMe2WZWKLeh0izGAu+I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hulk Robot , Yang Yingliang , Tony Lindgren , Sasha Levin Subject: [PATCH 5.10 022/529] ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() Date: Fri, 10 Mar 2023 14:32:45 +0100 Message-Id: <20230310133806.014928442@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133804.978589368@linuxfoundation.org> References: <20230310133804.978589368@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Yang Yingliang [ Upstream commit 0414a100d6ab32721efa70ab55524540fdfe0ede ] If platform_device_add() is not called or failed, it should call platform_device_put() in error case. Fixes: 97933d6ced60 ("ARM: OMAP1: dmtimer: conversion to platform devices") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Message-Id: <20220701094602.2365099-1-yangyingliang@huawei.com> Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap1/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index 97fc2096b9709..05f016d5e9f67 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c @@ -165,7 +165,7 @@ static int __init omap1_dm_timer_init(void) kfree(pdata); err_free_pdev: - platform_device_unregister(pdev); + platform_device_put(pdev); return ret; } -- 2.39.2