On Wed, Nov 29, 2017 at 09:47:33AM +0100, Geert Uytterhoeven wrote: > With gcc-4.1.2: > > drivers/infiniband/core/iwpm_util.c: In function ‘iwpm_send_mapinfo’: > drivers/infiniband/core/iwpm_util.c:647: warning: ‘ret’ may be used > uninitialized in this function > > Indeed, if nl_client is not found in any of the scanned has buckets, ret > will be used uninitialized. > > Preinitialize ret to -EINVAL to fix this. > > Fixes: 30dc5e63d6a5ad24 ("RDMA/core: Add support for iWARP Port Mapper user > space service") > Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> > Reviewed-by: Tatyana Nikolova <tatyana.e.nikol...@intel.com> > v2: > - Use -EINVAL instead of zero, > - Move the preinitialization to just before the loop, to catach future > early offenders, > - Drop RFC state. > drivers/infiniband/core/iwpm_util.c | 1 + > 1 file changed, 1 insertion(+)
Thanks applied to -next. Jason