Skip to content

Commit

Permalink
spi: atmel-quadspi: Disable clock in probe error path
Browse files Browse the repository at this point in the history
commit 0e68501 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: 2e5c888 ("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>
  • Loading branch information
l1k authored and gregkh committed Dec 30, 2020
1 parent 8f295ba commit 96f7bd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/atmel-quadspi.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 96f7bd3

Please sign in to comment.