spi: cadence: Fix probe error handling
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Tue, 5 Apr 2016 18:07:50 +0000 (23:37 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 5 Apr 2016 18:51:10 +0000 (11:51 -0700)
The clock disabling is missed out in some
error cases at probe. Fix the same.

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c

index 97a3bf680ccbf3ac902d4f7c469bf68f2c42dd6d..2915b257921da3470d5a47bf5756c47a0fa4223a 100644 (file)
@@ -527,7 +527,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
        if (irq <= 0) {
                ret = -ENXIO;
                dev_err(&pdev->dev, "irq number is invalid\n");
-               goto remove_master;
+               goto clk_dis_all;
        }
 
        ret = devm_request_irq(&pdev->dev, irq, cdns_spi_irq,
@@ -535,7 +535,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
        if (ret != 0) {
                ret = -ENXIO;
                dev_err(&pdev->dev, "request_irq failed\n");
-               goto remove_master;
+               goto clk_dis_all;
        }
 
        master->prepare_transfer_hardware = cdns_prepare_transfer_hardware;