IB/srp: Always initialize use_fast_reg and use_fmr
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 3 Jun 2016 18:39:35 +0000 (11:39 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 6 Jun 2016 23:32:58 +0000 (19:32 -0400)
commit249f06561fc333581e48e6d388a56e3d100d23b6
tree12c7be8d264f83ef47e3f9e1ec5926a120fd7eb2
parentca920f5b67f1b798a1f86c675ea441b295bf8464
IB/srp: Always initialize use_fast_reg and use_fmr

Avoid that mapping fails due to use_fast_reg != 0 or use_fmr != 0
if both member variables should be zero (if never_register == 1 or
if neither FMR nor FR is supported). Remove an initialization that
became superfluous due to changing a kmalloc() into a kzalloc()
call.

Fixes: 509c5f33f4f6 ("IB/srp: Prevent mapping failures")
Cc: Sagi Grimberg <sai@grimberg.m>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c