ravb: Fix up dma_free_coherent() call in ravb_remove()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 5 Oct 2023 01:12:00 +0000 (10:12 +0900)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Oct 2023 23:19:13 +0000 (16:19 -0700)
commite6864af61493113558c502b5cd0d754c19b93277
treecc77dd589a0058fad55b971b3184621c7377e06e
parentaba0e909dc20eceb1de985474af459f82e7b0b82
ravb: Fix up dma_free_coherent() call in ravb_remove()

In ravb_remove(), dma_free_coherent() should be call after
unregister_netdev(). Otherwise, this controller is possible to use
the freed buffer.

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/20231005011201.14368-2-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/ravb_main.c