From: Claudiu Beznea Date: Tue, 28 Nov 2023 08:04:38 +0000 (+0200) Subject: net: ravb: Stop DMA in case of failures on ravb_open() X-Git-Tag: v5.15.142~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a6b5321dcb064e0430c47f4239bfd65267428eb;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Claudiu Beznea Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 0c73bc4df98d5..1fa002c42c889 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1461,6 +1461,7 @@ out_ptp_stop: /* Stop PTP Clock driver */ if (info->gptp) ravb_ptp_stop(ndev); + ravb_stop_dma(ndev); out_free_irq_nc_tx: if (!info->multi_irqs) goto out_free_irq;