IB/srp: Avoid using uninitialized variable
authorSagi Grimberg <sagig@mellanox.com>
Thu, 25 Jun 2015 10:34:15 +0000 (13:34 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 14 Jul 2015 17:20:09 +0000 (13:20 -0400)
commit3fdf70acec13efc7ecf254f5a364df06348bfd2c
tree9c463c5431b02863acc8a4af9ed02796b01aa232
parentb356c1c1f90a347b6f67d9272dda7ecf47e0b46c
IB/srp: Avoid using uninitialized variable

We might return res which is not initialized. Also
reduce code duplication by exporting srp_parse_tmo so
srp_tmo_set can reuse it.

Detected by Coverity.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jenny Falkovich <jennyf@mellanox.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/scsi/scsi_transport_srp.c
include/scsi/scsi_transport_srp.h