summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2015-06-25 13:34:15 +0300
committerDoug Ledford <dledford@redhat.com>2015-07-14 13:20:09 -0400
commit3fdf70acec13efc7ecf254f5a364df06348bfd2c (patch)
tree9c463c5431b02863acc8a4af9ed02796b01aa232 /include
parentb356c1c1f90a347b6f67d9272dda7ecf47e0b46c (diff)
downloadlinux-3fdf70acec13efc7ecf254f5a364df06348bfd2c.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_transport_srp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h
index cdb05dd1d440..d40d3ef25707 100644
--- a/include/scsi/scsi_transport_srp.h
+++ b/include/scsi/scsi_transport_srp.h
@@ -119,6 +119,7 @@ extern struct srp_rport *srp_rport_add(struct Scsi_Host *,
extern void srp_rport_del(struct srp_rport *);
extern int srp_tmo_valid(int reconnect_delay, int fast_io_fail_tmo,
int dev_loss_tmo);
+int srp_parse_tmo(int *tmo, const char *buf);
extern int srp_reconnect_rport(struct srp_rport *rport);
extern void srp_start_tl_fail_timers(struct srp_rport *rport);
extern void srp_remove_host(struct Scsi_Host *);