mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
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: Hulk Robot <hulkci@huawei.com> Signed-off-by: Samuel Zou <zou_wei@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
01241aa000
commit
bbae62e32e
@ -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[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user