net/mlx5: Use PTR_ERR_OR_ZERO() to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 19 Jul 2016 11:35:46 +0000 (11:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 21:46:00 +0000 (14:46 -0700)
commit44fafdaa757cf251aade6c071f772ddb4e8a9885
tree6660281d3b85f404a0ac6d62d9520bd0d9ba5381
parent9a7bae8a12140c164082100a917ed5f856afccfc
net/mlx5: Use PTR_ERR_OR_ZERO() to simplify the code

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

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

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c