spi: sprd: call pm_runtime_put if pm_runtime_get_sync fails
Subsystems (2)
PATCH 1/1 spi: sprd: call pm_runtime_put if pm_runtime_get_sync fails
Call to pm_runtime_get_sync increments counter even in case of failure leading to incorrect ref count.
Call pm_runtime_put_noidle if pm_runtime_get_sync fails.
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/spi/spi-sprd.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-sprd.c +1 -0
@@ -1018,6 +1018,7 @@ static int sprd_spi_remove(struct platform_device *pdev) ret =pm_runtime_get_sync (ss->dev);if (ret <0 ) {dev_err (ss->dev,"failed to resume SPI controller\n" ); +pm_runtime_put_noidle (&pdev->dev);return ret; }
Signature · 1 line
2.17.1
Hi,
Quoted 6 lines · Navid Emamdoost
Call to
pm_runtime_get_syncincrements counter even in case of failure leading to incorrect ref count.
Callpm_runtime_put_noidleifpm_runtime_get_syncfails.Signed-off-by Navid Emamdoost <[email protected]>
Looks good to me. Thanks
Reviewed-by Baolin Wang <[email protected]>
Quoted 19 lines
--- drivers/spi/spi-sprd.c | 1 + 1 file changed, 1 insertion(+)drivers/spi/spi-sprd.c +1
-1@@ -1018,6 +1018,7 @@ static int sprd_spi_remove(struct platform_device *pdev) ret =pm_runtime_get_sync (ss->dev);if (ret <0 ) {dev_err (ss->dev,"failed to resume SPI controller\n" ); +pm_runtime_put_noidle (&pdev->dev);return ret; } --2.17.1
Signature · 1 line
Baolin Wang