[PATCH 1/3] spi: sh-hspi: Add missing call to pm_runtime_disable() in failure path

From: Geert Uytterhoeven
Date: Tue Mar 11 2014 - 06:00:10 EST


From: Geert Uytterhoeven <geert+renesas@xxxxxxxxxxxxxx>

Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxxxxxxx>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
drivers/spi/spi-sh-hspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c
index 3b170b9f3471..9009456bdf4d 100644
--- a/drivers/spi/spi-sh-hspi.c
+++ b/drivers/spi/spi-sh-hspi.c
@@ -278,11 +278,13 @@ static int hspi_probe(struct platform_device *pdev)
ret = devm_spi_register_master(&pdev->dev, master);
if (ret < 0) {
dev_err(&pdev->dev, "spi_register_master error.\n");
- goto error1;
+ goto error2;
}

return 0;

+ error2:
+ pm_runtime_disable(&pdev->dev);
error1:
clk_put(clk);
error0:
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/