diff mbox

[1/9] spi: rspi: Add missing clk_disable() calls in error and cleanup paths

Message ID 1389525222-3482-2-git-send-email-geert@linux-m68k.org (mailing list archive)
State Changes Requested
Headers show

Commit Message

Geert Uytterhoeven Jan. 12, 2014, 11:13 a.m. UTC
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 drivers/spi/spi-rspi.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Comments

Mark Brown Jan. 13, 2014, 11:59 a.m. UTC | #1
On Sun, Jan 12, 2014 at 12:13:34PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

This doesn't seem to apply to current code, please check and resend.
The fact that there's multiple patch serieses in flight from you for
this driver plus development work (again mostly from you) in git is
probably not helping here...
Geert Uytterhoeven Jan. 13, 2014, 12:17 p.m. UTC | #2
Hi Mark,

On Mon, Jan 13, 2014 at 12:59 PM, Mark Brown <broonie@kernel.org> wrote:
> On Sun, Jan 12, 2014 at 12:13:34PM +0100, Geert Uytterhoeven wrote:
>> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
>
> This doesn't seem to apply to current code, please check and resend.
> The fact that there's multiple patch serieses in flight from you for
> this driver plus development work (again mostly from you) in git is
> probably not helping here...

This depends on the series:

[PATCH V2 0/8] spi: rspi: Add support for RZ/A1H

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Jan. 13, 2014, 12:23 p.m. UTC | #3
On Mon, Jan 13, 2014 at 01:17:18PM +0100, Geert Uytterhoeven wrote:
> On Mon, Jan 13, 2014 at 12:59 PM, Mark Brown <broonie@kernel.org> wrote:

> > This doesn't seem to apply to current code, please check and resend.
> > The fact that there's multiple patch serieses in flight from you for
> > this driver plus development work (again mostly from you) in git is
> > probably not helping here...

> This depends on the series:

> [PATCH V2 0/8] spi: rspi: Add support for RZ/A1H

Please say if you're doing things like that, or ideally just send one
patch series since everything needs to be applied as one series - in
this case since the patch is a bug fix it ought to be going in before
anything else anyway.
diff mbox

Patch

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 04d512e1e894..5ce2127b2b43 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -1066,6 +1066,7 @@  static int rspi_remove(struct platform_device *pdev)
 	struct rspi_data *rspi = platform_get_drvdata(pdev);
 
 	rspi_release_dma(rspi);
+	clk_disable(rspi->clk);
 
 	return 0;
 }
@@ -1135,7 +1136,7 @@  static int rspi_probe(struct platform_device *pdev)
 	ret = ops->parse_platform_data(rspi, rspi_pd);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "rspi invalid platform data.\n");
-		goto error1;
+		goto error2;
 	}
 
 	for (i = 0; i < MAX_NUM_IRQ; i++) {
@@ -1145,13 +1146,13 @@  static int rspi_probe(struct platform_device *pdev)
 				break;
 			dev_err(&pdev->dev, "platform_get_irq error\n");
 			ret = -ENODEV;
-			goto error1;
+			goto error2;
 		}
 		ret = devm_request_irq(&pdev->dev, irq, rspi_irq, 0,
 				       dev_name(&pdev->dev), rspi);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "request_irq %d error\n", irq);
-			goto error1;
+			goto error2;
 		}
 		rspi->irqs[i] = irq;
 		rspi->num_irqs++;
@@ -1160,21 +1161,23 @@  static int rspi_probe(struct platform_device *pdev)
 	ret = rspi_request_dma(rspi, pdev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "rspi_request_dma failed.\n");
-		goto error2;
+		goto error3;
 	}
 
 	ret = devm_spi_register_master(&pdev->dev, master);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "spi_register_master error.\n");
-		goto error2;
+		goto error3;
 	}
 
 	dev_info(&pdev->dev, "probed\n");
 
 	return 0;
 
-error2:
+error3:
 	rspi_release_dma(rspi);
+error2:
+	clk_disable(rspi->clk);
 error1:
 	spi_master_put(master);