mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 03:00:53 +07:00
net: mediatek: fix checking for NULL instead of IS_ERR() in .probe
devm_ioremap_resource() returns ERR_PTR() value on error, it never
returns NULL, fix it and propagate the returned error upwards.
Fixes: 656e705243
("net-next: mediatek: add support for MT7623 ethernet")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9eb13f65c3
commit
621e49f6d8
@ -1690,8 +1690,8 @@ static int mtk_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
eth->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!eth->base)
|
||||
return -EADDRNOTAVAIL;
|
||||
if (IS_ERR(eth->base))
|
||||
return PTR_ERR(eth->base);
|
||||
|
||||
spin_lock_init(ð->page_lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user