Re: [PATCH 4/4] IB: Remove redundant error check

2014-05-17 Thread Dan Carpenter
On Sat, May 17, 2014 at 08:23:00PM +0200, Peter Senna Tschudin wrote: > --- > drivers/infiniband/hw/ocrdma/ocrdma_hw.c |6 +++--- > drivers/infiniband/ulp/srpt/ib_srpt.c|8 > 2 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma

[PATCH 4/4] IB: Remove redundant error check

2014-05-17 Thread Peter Senna Tschudin
Remove double checks, and move calls to pr_err and printk to the first check. The simplified version of the coccinelle semantic patch that fixes this issue is as follows: // @@ expression E; identifier pr; expression list es; @@ for(...;...;...){ ... - if (E) break; + if (E){ +