ethernet: 8390: remove unnecessary check of mem

The 'mem' returned by platform_get_resource() has been checked in probe
function, so it is no need do this check in remove function.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220927151406.797800-1-yangyingliang@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Yang Yingliang 2022-09-27 23:14:06 +08:00 committed by Paolo Abeni
parent d49e265b66
commit 0e9804cff1

View File

@ -450,7 +450,6 @@ static int mcf8390_remove(struct platform_device *pdev)
unregister_netdev(dev);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (mem)
release_mem_region(mem->start, resource_size(mem));
free_netdev(dev);
return 0;