diff mbox series

spi: atmel-quadspi: Disable clock in probe error path

Message ID 8f8dc2815aa97b2378528f08f923bf81e19611f0.1604874488.git.lukas@wunner.de (mailing list archive)
State Accepted
Commit 0e685017c7ba1a2fe9f6f1e7a9302890747d934c
Headers show
Series spi: atmel-quadspi: Disable clock in probe error path | expand

Commit Message

Lukas Wunner Nov. 8, 2020, 10:41 p.m. UTC
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>
---
 drivers/spi/atmel-quadspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tudor Ambarus Nov. 9, 2020, 6:56 p.m. UTC | #1
On 11/9/20 12:41 AM, Lukas Wunner wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> 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>

Thanks!

> ---
>  drivers/spi/atmel-quadspi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
> index 8c009c175f2c..b44521d4a245 100644
> --- a/drivers/spi/atmel-quadspi.c
> +++ b/drivers/spi/atmel-quadspi.c
> @@ -594,7 +594,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) {
> --
> 2.28.0
>
Mark Brown Nov. 10, 2020, 4:03 p.m. UTC | #2
On Sun, 8 Nov 2020 23:41:00 +0100, Lukas Wunner wrote:
> 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.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: atmel-quadspi: Disable clock in probe error path
      commit: 0e685017c7ba1a2fe9f6f1e7a9302890747d934c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 8c009c175f2c..b44521d4a245 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -594,7 +594,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) {