Commit b9ab22c2 authored by Tony Lindgren's avatar Tony Lindgren Committed by Greg Kroah-Hartman

serial: 8250: omap: Fix freeing of resources on failed register

If serial8250_register_8250_port() fails, the SoC can hang as the
deferred PMQoS work will still run as is not flushed and removed.

Fixes: 61929cf0 ("tty: serial: Add 8250-core based omap driver")
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230508082014.23083-2-tony@atomide.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6d8c1fca
...@@ -1532,7 +1532,9 @@ static int omap8250_probe(struct platform_device *pdev) ...@@ -1532,7 +1532,9 @@ static int omap8250_probe(struct platform_device *pdev)
err: err:
pm_runtime_dont_use_autosuspend(&pdev->dev); pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_sync(&pdev->dev); pm_runtime_put_sync(&pdev->dev);
flush_work(&priv->qos_work);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
cpu_latency_qos_remove_request(&priv->pm_qos_request);
return ret; return ret;
} }
......
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