net: ravb: Stop DMA in case of failures on ravb_open()
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tue, 28 Nov 2023 08:04:38 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:52:23 +0000 (08:52 +0100)
commit736651c8f874705d8a1997a718c3f369934c393b
tree6a085fe5b69b4660005811474a1d6a3a4449016e
parentc03af071bee7f8a6f5e16214c5eb4ab177a9d363
net: ravb: Stop DMA in case of failures on ravb_open()

[ Upstream commit eac16a733427ba0de2449ffc7bd3da32ddb65cb7 ]

In case ravb_phy_start() returns with error the settings applied in
ravb_dmac_init() are not reverted (e.g. config mode). For this call
ravb_stop_dma() on failure path of ravb_open().

Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver")
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/renesas/ravb_main.c