Re: [PATCH 5/25] IB/mlx4: fix error return code

2013-12-30 Thread Jack Morgenstein
On Sun, 29 Dec 2013 23:47:20 +0100 Julia Lawall wrote: > diff --git a/drivers/infiniband/hw/mlx4/sysfs.c > b/drivers/infiniband/hw/mlx4/sysfs.c index 97516eb..db2ea31 100644 > --- a/drivers/infiniband/hw/mlx4/sysfs.c > +++ b/drivers/infiniband/hw/mlx4/sysfs.c > @@ -582,8 +582,10 @@ static int add

[PATCH 5/25] IB/mlx4: fix error return code

2013-12-29 Thread Julia Lawall
From: Julia Lawall Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret =