stmmac: fix ptr_ret.cocci warning
authorFengguang Wu <fengguang.wu@intel.com>
Tue, 28 Jul 2015 22:08:48 +0000 (00:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2015 07:13:22 +0000 (00:13 -0700)
commita04c0aef74bbd807cd43ffa12404c3d6a6021865
treeea5cc423c8ba5251c3076c0d8350cdc35d388176
parent6d85d0e38730c2a55beffe4a9617d89fbd34037c
stmmac: fix ptr_ret.cocci warning

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:304:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
[je: rebase and insert newline before return]
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c