linux/drivers/infiniband/hw
Julia Lawall 5f4c7e4eb5 IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR
The function usnic_ib_qp_grp_get_chunk only returns an ERR_PTR value or a
valid pointer, never NULL.  The same is true of get_qp_res_chunk, which
just returns the result of calling usnic_ib_qp_grp_get_chunk.  Simplify
IS_ERR_OR_NULL to IS_ERR in both cases.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,e;
@@

t = \(usnic_ib_qp_grp_get_chunk(...)\|get_qp_res_chunk(...)\)
... when != t=e
- IS_ERR_OR_NULL(t)
+ IS_ERR(t)

@@
expression t,e,e1;
@@

t = \(usnic_ib_qp_grp_get_chunk(...)\|get_qp_res_chunk(...)\)
... when != t=e
?- t ? PTR_ERR(t) : e1
+ PTR_ERR(t)
... when any
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-12-14 12:57:54 -05:00
..
cxgb3 IB/cxgb3: Move user vendor structures 2016-10-07 16:54:35 -04:00
cxgb4 Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
hfi1 IB/mad: Eliminate redundant SM class version defines for OPA 2016-12-14 11:01:58 -05:00
hns IB/hns: Fix for removal of redundant code 2016-10-03 11:43:15 -04:00
i40iw Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
mlx4 Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
mlx5 net/mlx5: Add multi dest support 2016-10-30 15:43:17 +02:00
mthca mm: replace get_user_pages() write/force parameters with gup_flags 2016-10-19 08:11:43 -07:00
nes IB/nes: use new api ethtool_{get|set}_link_ksettings 2016-12-14 12:52:25 -05:00
ocrdma Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
qedr qedr: Add events support and register IB device 2016-10-14 15:00:10 -04:00
qib mm: replace get_user_pages() write/force parameters with gup_flags 2016-10-19 08:11:43 -07:00
usnic IB/usnic: simplify IS_ERR_OR_NULL to IS_ERR 2016-12-14 12:57:54 -05:00
Makefile qedr: Add RoCE driver framework 2016-10-14 15:00:10 -04:00