summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2020-11-09 01:41:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 13:51:43 +0300
commit96f7bd39f56f735e21780e11f949859bfdfeedfe (patch)
tree40346635065b231a68484a1897b28764a3092973 /drivers/spi
parent8f295baae53db98a138a6bb94ef113b3d2d95993 (diff)
downloadlinux-96f7bd39f56f735e21780e11f949859bfdfeedfe.tar.xz
spi: atmel-quadspi: Disable clock in probe error path
commit 0e685017c7ba1a2fe9f6f1e7a9302890747d934c upstream. If the call to of_device_get_match_data() fails on probe of the Atmel QuadSPI driver, the clock "aq->pclk" is erroneously not unprepared and disabled. Fix it. Fixes: 2e5c88887358 ("spi: atmel-quadspi: add support for sam9x60 qspi controller") Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: <stable@vger.kernel.org> # v5.1+ Cc: Tudor Ambarus <tudor.ambarus@microchip.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/8f8dc2815aa97b2378528f08f923bf81e19611f0.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/atmel-quadspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 225b59bde36c..832f34941622 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -510,7 +510,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
if (!aq->caps) {
dev_err(&pdev->dev, "Could not retrieve QSPI caps\n");
err = -EINVAL;
- goto exit;
+ goto disable_pclk;
}
if (aq->caps->has_qspick) {