Skip to content
Commit 0fd7d43f authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

net: qcom/emac: fix return value check in emac_sgmii_config()

In case of error, the function ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Also add check for return value of platform_get_resource().

Fixes: 54e19bc7

 ("net: qcom/emac: do not use devm on internal
phy pdev")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarTimur Tabi <timur@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6a79208
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment