Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Santosh Shilimkar
On 4/7/2017 7:24 AM, Dan Carpenter wrote: Setting it to zero doesn't seem like the right thing, it should be an error code. Oh, heh... Smatch parses this one correctly. "ret" is always initialized but the code is probably buggy in a different way: [...] 561 ibmr =

Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Santosh Shilimkar
On 4/7/2017 7:24 AM, Dan Carpenter wrote: Setting it to zero doesn't seem like the right thing, it should be an error code. Oh, heh... Smatch parses this one correctly. "ret" is always initialized but the code is probably buggy in a different way: [...] 561 ibmr =

Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Dan Carpenter
Setting it to zero doesn't seem like the right thing, it should be an error code. Oh, heh... Smatch parses this one correctly. "ret" is always initialized but the code is probably buggy in a different way: net/rds/ib_rdma.c 539 void *rds_ib_get_mr(struct scatterlist *sg, unsigned long

Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Dan Carpenter
Setting it to zero doesn't seem like the right thing, it should be an error code. Oh, heh... Smatch parses this one correctly. "ret" is always initialized but the code is probably buggy in a different way: net/rds/ib_rdma.c 539 void *rds_ib_get_mr(struct scatterlist *sg, unsigned long

Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread David Miller
From: Colin King Date: Fri, 7 Apr 2017 08:57:23 +0100 > From: Colin Ian King > > There is a path where ibmr is null and ret has not been initialized > and hence a pr_warn message is printing an uninitialized value in > ret. Fix this by

Re: [PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread David Miller
From: Colin King Date: Fri, 7 Apr 2017 08:57:23 +0100 > From: Colin Ian King > > There is a path where ibmr is null and ret has not been initialized > and hence a pr_warn message is printing an uninitialized value in > ret. Fix this by initializing ret to zero. > > Detected by CoverityScan,

[PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Colin King
From: Colin Ian King There is a path where ibmr is null and ret has not been initialized and hence a pr_warn message is printing an uninitialized value in ret. Fix this by initializing ret to zero. Detected by CoverityScan, CID#1357946 ("Uninitialized scalar

[PATCH] RDS: IB: ensure an initialized ret is printed in pr_warn message

2017-04-07 Thread Colin King
From: Colin Ian King There is a path where ibmr is null and ret has not been initialized and hence a pr_warn message is printing an uninitialized value in ret. Fix this by initializing ret to zero. Detected by CoverityScan, CID#1357946 ("Uninitialized scalar variable") Signed-off-by: Colin