|
@@ -574,10 +574,15 @@ static int meson_spicc_probe(struct platform_device *pdev)
|
|
master->max_speed_hz = rate >> 2;
|
|
master->max_speed_hz = rate >> 2;
|
|
|
|
|
|
ret = devm_spi_register_master(&pdev->dev, master);
|
|
ret = devm_spi_register_master(&pdev->dev, master);
|
|
- if (!ret)
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if (ret) {
|
|
|
|
+ dev_err(&pdev->dev, "spi master registration failed\n");
|
|
|
|
+ goto out_clk;
|
|
|
|
+ }
|
|
|
|
|
|
- dev_err(&pdev->dev, "spi master registration failed\n");
|
|
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+out_clk:
|
|
|
|
+ clk_disable_unprepare(spicc->core);
|
|
|
|
|
|
out_master:
|
|
out_master:
|
|
spi_master_put(master);
|
|
spi_master_put(master);
|