mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
spi: spi-fsl-dspi: Fix a resource leak in an error handling path
commit680ec0549a
upstream 'dspi_request_dma()' should be undone by a 'dspi_release_dma()' call in the error handling path of the probe function, as already done in the remove function Fixes:90ba37033c
("spi: spi-fsl-dspi: Add DMA support for Vybrid") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://lore.kernel.org/r/d51caaac747277a1099ba8dea07acd85435b857e.1620587472.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org> [sudip: adjust context] Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a941105525
commit
00450ed03a
1 changed files with 3 additions and 1 deletions
|
@ -1124,11 +1124,13 @@ static int dspi_probe(struct platform_device *pdev)
|
|||
ret = spi_register_master(master);
|
||||
if (ret != 0) {
|
||||
dev_err(&pdev->dev, "Problem registering DSPI master\n");
|
||||
goto out_free_irq;
|
||||
goto out_release_dma;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
out_release_dma:
|
||||
dspi_release_dma(dspi);
|
||||
out_free_irq:
|
||||
if (dspi->irq)
|
||||
free_irq(dspi->irq, dspi);
|
||||
|
|
Loading…
Reference in a new issue