diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2014-07-12 16:51:49 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-08-01 08:16:39 -0400 |
commit | 7f3976f03ff128fd5aa8dc22e4784d03311ebd09 (patch) | |
tree | 4c334ee3e2b51bc69322172be8386dac490b887f /drivers/scsi/qla4xxx | |
parent | a5c277ec5a331171c6508924ce7767e363bf3a05 (diff) |
qla4xxx: fix get_host_stats error propagation
qla4xxx was not always returning -EXYZ error codes when
qla4xxx_get_host_stats failed.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 82b46ee8e7c1..199fcf79a051 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -1050,6 +1050,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len) | |||
1050 | if (!ql_iscsi_stats) { | 1050 | if (!ql_iscsi_stats) { |
1051 | ql4_printk(KERN_ERR, ha, | 1051 | ql4_printk(KERN_ERR, ha, |
1052 | "Unable to allocate memory for iscsi stats\n"); | 1052 | "Unable to allocate memory for iscsi stats\n"); |
1053 | ret = -ENOMEM; | ||
1053 | goto exit_host_stats; | 1054 | goto exit_host_stats; |
1054 | } | 1055 | } |
1055 | 1056 | ||
@@ -1058,6 +1059,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len) | |||
1058 | if (ret != QLA_SUCCESS) { | 1059 | if (ret != QLA_SUCCESS) { |
1059 | ql4_printk(KERN_ERR, ha, | 1060 | ql4_printk(KERN_ERR, ha, |
1060 | "Unable to retrieve iscsi stats\n"); | 1061 | "Unable to retrieve iscsi stats\n"); |
1062 | ret = -EIO; | ||
1061 | goto exit_host_stats; | 1063 | goto exit_host_stats; |
1062 | } | 1064 | } |
1063 | host_stats->mactx_frames = le64_to_cpu(ql_iscsi_stats->mac_tx_frames); | 1065 | host_stats->mactx_frames = le64_to_cpu(ql_iscsi_stats->mac_tx_frames); |