Skip to content
Commit 302d6424 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jason Gunthorpe
Browse files

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: 30dc5e63 ("RDMA/core: Add support for iWARP Port Mapper user space service")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: default avatarTatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent ac6dbf7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment