Commit bcf1531d authored by Tony Lindgren's avatar Tony Lindgren Committed by sanglipeng
Browse files

phy: mapphone-mdm6600: Fix runtime disable on probe

stable inclusion
from stable-v5.10.199
commit f42634685ee5fac1387b74d0b9f0a200ed5441a1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9AWJ5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f42634685ee5fac1387b74d0b9f0a200ed5441a1



--------------------------------

[ Upstream commit 71960615 ]

Commit d644e0d7 ("phy: mapphone-mdm6600: Fix PM error handling in
phy_mdm6600_probe") caused a regression where we now unconditionally
disable runtime PM at the end of the probe while it is only needed on
errors.

Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Miaoqian Lin <linmq006@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Fixes: d644e0d7 ("phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe")
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20230913060433.48373-1-tony@atomide.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent d862a605
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -627,10 +627,12 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
	pm_runtime_put_autosuspend(ddata->dev);

cleanup:
	if (error < 0)
	if (error < 0) {
		phy_mdm6600_device_power_off(ddata);
		pm_runtime_disable(ddata->dev);
		pm_runtime_dont_use_autosuspend(ddata->dev);
	}

	return error;
}