Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91ac4bf3 authored by Yang Yingliang's avatar Yang Yingliang Committed by Greg Kroah-Hartman
Browse files

ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()



[ Upstream commit 0414a100d6ab32721efa70ab55524540fdfe0ede ]

If platform_device_add() is not called or failed, it should call
platform_device_put() in error case.

Fixes: 97933d6c ("ARM: OMAP1: dmtimer: conversion to platform devices")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Message-Id: <20220701094602.2365099-1-yangyingliang@huawei.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent af3352c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}