diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-27 23:14:06 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-09-29 11:05:23 +0200 |
commit | 0e9804cff18223e750f3af52a2701945bb362f55 (patch) | |
tree | 002033ffa0c585b0459bac0f4edb545d5310bdc4 | |
parent | d49e265b66d9cf1537e93c44e189110f87cb656d (diff) | |
download | linux-0e9804cff18223e750f3af52a2701945bb362f55.tar.bz2 |
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>
-rw-r--r-- | drivers/net/ethernet/8390/mcf8390.c | 3 |
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; } |