diff mbox series

[1/1] spi: atmel: Put allocated master before return

Message ID 20210120050025.25426-1-bianpan2016@163.com (mailing list archive)
State New, archived
Headers show
Series [1/1] spi: atmel: Put allocated master before return | expand

Commit Message

Pan Bian Jan. 20, 2021, 5 a.m. UTC
The allocated master is not released. Goto error handling label rather
than directly return.

Fixes: 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/spi/spi-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tudor Ambarus Jan. 21, 2021, noon UTC | #1
On 1/20/21 7:00 AM, Pan Bian wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The allocated master is not released. Goto error handling label rather
> than directly return.
> 
> Fixes: 04242ca4e891 ("spi: atmel: Use SPI core DMA mapping framework")
The correct fixes tag is:
Fixes: 5e9af37e46bc ("spi: atmel: introduce probe deferring")

With this addressed, one can add:
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/spi/spi-atmel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 948396b382d7..f429436082af 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
>                 if (ret == 0) {
>                         as->use_dma = true;
>                 } else if (ret == -EPROBE_DEFER) {
> -                       return ret;
> +                       goto out_unmap_regs;
>                 }
>         } else if (as->caps.has_pdc_support) {
>                 as->use_pdc = true;
> --
> 2.17.1
> 
>
Mark Brown Jan. 21, 2021, 7:41 p.m. UTC | #2
On Tue, 19 Jan 2021 21:00:25 -0800, Pan Bian wrote:
> The allocated master is not released. Goto error handling label rather
> than directly return.

Applied to

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

Thanks!

[1/1] spi: atmel: Put allocated master before return
      commit: 21ea2743f015dbacec1831bdc8afc848db9c2b8c

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/spi-atmel.c b/drivers/spi/spi-atmel.c
index 948396b382d7..f429436082af 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1590,7 +1590,7 @@  static int atmel_spi_probe(struct platform_device *pdev)
 		if (ret == 0) {
 			as->use_dma = true;
 		} else if (ret == -EPROBE_DEFER) {
-			return ret;
+			goto out_unmap_regs;
 		}
 	} else if (as->caps.has_pdc_support) {
 		as->use_pdc = true;