Commit c75a6dea authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jinjie Ruan
Browse files

spi: spi-fsl-dspi: Fix a resource leak in an error handling path

stable inclusion
from stable-v4.19.199
commit 00450ed03a17143e2433b461a656ef9cd17c2f1d
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9BHN7
CVE: CVE-2021-47161

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00450ed03a17143e2433b461a656ef9cd17c2f1d



---------------------------

commit 680ec054 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: 90ba3703 ("spi: spi-fsl-dspi: Add DMA support for Vybrid")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/d51caaac747277a1099ba8dea07acd85435b857e.1620587472.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
[sudip: adjust context]
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Conflicts:
	drivers/spi/spi-fsl-dspi.c

Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
parent ce7ba9ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment