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

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
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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[] = {