Skip to content

Commit 4439a2e

Browse files
Jinjie Ruanbroonie
authored andcommitted
spi: bcmbca-hsspi: Fix missing pm_runtime_disable()
The pm_runtime_disable() is missing in remove function, use devm_pm_runtime_enable() to fix it. So the pm_runtime_disable() in the probe error path can also be removed. Fixes: a38a223 ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller") Signed-off-by: Jinjie Ruan <[email protected]> Reviewed-by: William Zhang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2fe6102 commit 4439a2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/spi/spi-bcmbca-hsspi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,12 +539,14 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
539539
goto out_put_host;
540540
}
541541

542-
pm_runtime_enable(&pdev->dev);
542+
ret = devm_pm_runtime_enable(&pdev->dev);
543+
if (ret)
544+
goto out_put_host;
543545

544546
ret = sysfs_create_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
545547
if (ret) {
546548
dev_err(&pdev->dev, "couldn't register sysfs group\n");
547-
goto out_pm_disable;
549+
goto out_put_host;
548550
}
549551

550552
/* register and we are done */
@@ -558,8 +560,6 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
558560

559561
out_sysgroup_disable:
560562
sysfs_remove_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
561-
out_pm_disable:
562-
pm_runtime_disable(&pdev->dev);
563563
out_put_host:
564564
spi_controller_put(host);
565565
out_disable_pll_clk:

0 commit comments

Comments
 (0)