linux/drivers/infiniband
Geert Uytterhoeven 302d6424e4 RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo()
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: 30dc5e63d6 ("RDMA/core: Add support for iWARP Port Mapper user space service")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2017-12-13 10:55:49 -07:00
..
core RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo() 2017-12-13 10:55:49 -07:00
hw RDMA/bnxt_re: Remove redundant bnxt_qplib_disable_nq() call 2017-12-13 10:35:31 -07:00
sw Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
ulp IB/ipoib: Warn when one port fails to initialize 2017-12-13 10:55:49 -07:00
Kconfig infiniband: add MMU dependency for user_mem 2017-10-10 10:49:44 -04:00
Makefile