Patch "ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()" 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

    ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()

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:
     asoc-sh-rz-ssi-check-return-value-of-pm_runtime_resu.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 a1a8d8f50e0233f946dbc56ce97a0533486c1aff
Author: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date:   Fri Dec 17 10:22:31 2021 +0100

    ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get()
    
    [ Upstream commit f04b4fb47d83b110a5b007fb2eddea862cfeb151 ]
    
    The return value of pm_runtime_resume_and_get() needs to be checked to
    avoid a usage count imbalance in the error case. This fix is basically
    the same as 92c959bae2e5 ("reset: renesas: Fix Runtime PM usage"),
    and the last step before pm_runtime_resume_and_get() can be annotated
    as __must_check.
    
    Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
    Link: https://lore.kernel.org/r/9fed506d-b780-55cd-45a4-9bd2407c910f@xxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c
index 16de2633a873..7379b1489e35 100644
--- a/sound/soc/sh/rz-ssi.c
+++ b/sound/soc/sh/rz-ssi.c
@@ -1025,7 +1025,12 @@ static int rz_ssi_probe(struct platform_device *pdev)
 
 	reset_control_deassert(ssi->rstc);
 	pm_runtime_enable(&pdev->dev);
-	pm_runtime_resume_and_get(&pdev->dev);
+	ret = pm_runtime_resume_and_get(&pdev->dev);
+	if (ret < 0) {
+		pm_runtime_disable(ssi->dev);
+		reset_control_assert(ssi->rstc);
+		return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n");
+	}
 
 	ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component,
 					      rz_ssi_soc_dai,



[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