Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()

On remove, we get an error for "Runtime PM usage count underflow!". I guess
this driver is mostly built-in, and this issue has gone unnoticed for a
while. Somehow I did not catch this issue with my earlier fix done with
commit 4e0f5cc65098 ("serial: 8250_omap: Fix probe and remove for PM
runtime").

Fixes: 4e0f5cc65098 ("serial: 8250_omap: Fix probe and remove for PM runtime")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Depends-on: dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
Link: https://lore.kernel.org/r/20221028105813.54290-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tony Lindgren and committed by
Greg Kroah-Hartman
e3f0c638 e828e566

+5
+5
drivers/tty/serial/8250/8250_omap.c
··· 1460 1460 static int omap8250_remove(struct platform_device *pdev) 1461 1461 { 1462 1462 struct omap8250_priv *priv = platform_get_drvdata(pdev); 1463 + int err; 1464 + 1465 + err = pm_runtime_resume_and_get(&pdev->dev); 1466 + if (err) 1467 + return err; 1463 1468 1464 1469 pm_runtime_dont_use_autosuspend(&pdev->dev); 1465 1470 pm_runtime_put_sync(&pdev->dev);