mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
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:
parent
d49e265b66
commit
0e9804cff1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user