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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 = rds_ib_reg_fmr(rds_ibdev, sg, nents, key_ret);
   562          if (ibmr)
                    ^^^^
This condition is always true because those functions return ERR_PTRs
not NULLs.

Thanks Dan. I will fix that up.

Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux