Skip to content

Commit 7f3976f

Browse files
Mike ChristieChristoph Hellwig
authored andcommitted
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>
1 parent a5c277e commit 7f3976f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/scsi/qla4xxx/ql4_os.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len)
10501050
if (!ql_iscsi_stats) {
10511051
ql4_printk(KERN_ERR, ha,
10521052
"Unable to allocate memory for iscsi stats\n");
1053+
ret = -ENOMEM;
10531054
goto exit_host_stats;
10541055
}
10551056

@@ -1058,6 +1059,7 @@ static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len)
10581059
if (ret != QLA_SUCCESS) {
10591060
ql4_printk(KERN_ERR, ha,
10601061
"Unable to retrieve iscsi stats\n");
1062+
ret = -EIO;
10611063
goto exit_host_stats;
10621064
}
10631065
host_stats->mactx_frames = le64_to_cpu(ql_iscsi_stats->mac_tx_frames);

0 commit comments

Comments
 (0)