summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/8390
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-27 18:14:06 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-09-29 12:05:23 +0300
commit0e9804cff18223e750f3af52a2701945bb362f55 (patch)
tree002033ffa0c585b0459bac0f4edb545d5310bdc4 /drivers/net/ethernet/8390
parentd49e265b66d9cf1537e93c44e189110f87cb656d (diff)
downloadlinux-0e9804cff18223e750f3af52a2701945bb362f55.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/8390')
-rw-r--r--drivers/net/ethernet/8390/mcf8390.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/mcf8390.c b/drivers/net/ethernet/8390/mcf8390.c
index 21047ae1bc3d..8a7918d33419 100644
--- a/drivers/net/ethernet/8390/mcf8390.c
+++ b/drivers/net/ethernet/8390/mcf8390.c
@@ -450,8 +450,7 @@ 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));
+ release_mem_region(mem->start, resource_size(mem));
free_netdev(dev);
return 0;
}