Patch "serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-8250-omap-fix-unpaired-pm_runtime_put_sync-in.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6ea361b4bd6d8951e196838671030080be0f0cc9
Author: Tony Lindgren <tony@xxxxxxxxxxx>
Date:   Fri Oct 28 13:58:13 2022 +0300

    serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()
    
    [ Upstream commit e3f0c638f428fd66b5871154b62706772045f91a ]
    
    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@xxxxxxxxxxx>
    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@xxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 5707d86cac76..f3f54cb0cfca 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1475,6 +1475,11 @@ static int omap8250_probe(struct platform_device *pdev)
 static int omap8250_remove(struct platform_device *pdev)
 {
 	struct omap8250_priv *priv = platform_get_drvdata(pdev);
+	int err;
+
+	err = pm_runtime_resume_and_get(&pdev->dev);
+	if (err)
+		return err;
 
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_put_sync(&pdev->dev);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux