Re: [PATCH] spi: stm32-ospi: Fix an error handling path in stm32_ospi_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/18/2025 4:57 PM, Christophe JAILLET wrote:
[...]
diff --git a/drivers/spi/spi-stm32-ospi.c b/drivers/spi/spi-stm32-ospi.c
index 668022098b1e..9ec9823409cc 100644
--- a/drivers/spi/spi-stm32-ospi.c
+++ b/drivers/spi/spi-stm32-ospi.c
@@ -960,6 +960,10 @@ static int stm32_ospi_probe(struct platform_device *pdev)
  err_pm_enable:
  	pm_runtime_force_suspend(ospi->dev);
  	mutex_destroy(&ospi->lock);
+	if (ospi->dma_chtx)
+		dma_release_channel(ospi->dma_chtx);
why can't you move to devm_dma_request_chan ? No need to cleanup.
+	if (ospi->dma_chrx)
+		dma_release_channel(ospi->dma_chrx);
return ret;
  }





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux