Commit bbae62e3 authored by Samuel Zou's avatar Samuel Zou Committed by David S. Miller

net: ethernet: ti: Use PTR_ERR_OR_ZERO() to simplify code

Fixes coccicheck warning:

drivers/net/ethernet/ti/am65-cpts.c:1017:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarSamuel Zou <zou_wei@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01241aa0
......@@ -1014,10 +1014,7 @@ static int am65_cpts_probe(struct platform_device *pdev)
return PTR_ERR(base);
cpts = am65_cpts_create(dev, base, node);
if (IS_ERR(cpts))
return PTR_ERR(cpts);
return 0;
return PTR_ERR_OR_ZERO(cpts);
}
static const struct of_device_id am65_cpts_of_match[] = {
......
Markdown is supported
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