Commit 51e339de authored by Wang Li's avatar Wang Li Committed by Vinod Koul

phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure

pm_runtime_enable() will decrease power disable depth. Thus a pairing
increment is needed on the error handling path to keep it balanced.

Fixes: 5d8042e9 ("phy: rcar-gen3-usb2: Add support for r8a77470")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Li <wangli74@huawei.com>
Link: https://lore.kernel.org/r/20201126024412.4046845-1-wangli74@huawei.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent f5f6e01f
......@@ -654,8 +654,10 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
*/
pm_runtime_enable(dev);
phy_usb2_ops = of_device_get_match_data(dev);
if (!phy_usb2_ops)
return -EINVAL;
if (!phy_usb2_ops) {
ret = -EINVAL;
goto error;
}
mutex_init(&channel->lock);
for (i = 0; i < NUM_OF_PHYS; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment