Skip to content

Commit 11543f5

Browse files
committed
spi: bcmbca-hsspi: Fix missing pm_runtime_disable()
Merge series from Jinjie Ruan <[email protected]>: Fix missing pm_runtime_disable().
2 parents 1db8665 + deb269e commit 11543f5

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/spi/spi-bcmbca-hsspi.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
480480
}
481481
}
482482

483-
host = spi_alloc_host(&pdev->dev, sizeof(*bs));
483+
host = devm_spi_alloc_host(&pdev->dev, sizeof(*bs));
484484
if (!host) {
485485
ret = -ENOMEM;
486486
goto out_disable_pll_clk;
@@ -536,15 +536,17 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
536536
ret = devm_request_irq(dev, irq, bcmbca_hsspi_interrupt, IRQF_SHARED,
537537
pdev->name, bs);
538538
if (ret)
539-
goto out_put_host;
539+
goto out_disable_pll_clk;
540540
}
541541

542-
pm_runtime_enable(&pdev->dev);
542+
ret = devm_pm_runtime_enable(&pdev->dev);
543+
if (ret)
544+
goto out_disable_pll_clk;
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_disable_pll_clk;
548550
}
549551

550552
/* register and we are done */
@@ -558,10 +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);
563-
out_put_host:
564-
spi_controller_put(host);
565563
out_disable_pll_clk:
566564
clk_disable_unprepare(pll_clk);
567565
out_disable_clk:

0 commit comments

Comments
 (0)