Skip to content
Commit a7654211 authored by Tang Bin's avatar Tang Bin Committed by David S. Miller
Browse files

net: sgi: ioc3-eth: Fix return value check in ioc3eth_probe()



In the function devm_platform_ioremap_resource(), if get resource
failed, the return value is ERR_PTR() not NULL. Thus it must be
replaced by IS_ERR(), or else it may result in crashes if a critical
error path is encountered.

Fixes: 0ce5ebd2 ("mfd: ioc3: Add driver for SGI IOC3 chip")
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 41b4bd98
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