ethernet: sun: Free the coherent when failing in probing
authorZheyu Ma <zheyuma97@gmail.com>
Sat, 5 Mar 2022 14:55:04 +0000 (14:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:08 +0000 (09:08 +0200)
commite4ba28fbe9035e79ac5c397c67fcb404aa439ec1
tree318cffcd71a72bc6387f04a252a0fd9ea109360c
parentce1a7ed741357c08c520a44734afb51567fb0b07
ethernet: sun: Free the coherent when failing in probing

[ Upstream commit bb77bd31c281f70ec77c9c4f584950a779e05cf8 ]

When the driver fails to register net device, it should free the DMA
region first, and then do other cleanup.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sun/sunhme.c