dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 19 Dec 2020 13:28:00 +0000 (14:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:17:02 +0000 (14:17 +0100)
commit41f95d84fcf58fcbdeaffb28bcec290cecf1608e
tree2ace41796599feefccb4e97740475f194a2630dd
parentceb97fbe4816788a58dfb5d83233cd6f47dd61c8
dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function

commit d645148cc82ca7fbacaa601414a552184e9c6dd3 upstream.

'disable_xdmac()' should be called in the error handling path of the
probe function to undo a previous 'enable_xdmac()' call, as already
done in the remove function.

Fixes: a6e9be055d47 ("dmaengine: milbeaut-xdmac: Add XDMAC driver for Milbeaut platforms")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201219132800.183254-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/milbeaut-xdmac.c