summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2014-07-12 15:51:48 -0500
committerChristoph Hellwig <hch@lst.de>2014-08-01 08:16:39 -0400
commit2f7608fc5e6c8a70df3ce31406feee70a42458ba (patch)
treeb43d58a2735f06ae869e39a37e765fc4543a4ff1 /drivers/scsi/scsi_transport_iscsi.c
parent7f3976f03ff128fd5aa8dc22e4784d03311ebd09 (diff)
downloadop-kernel-dev-2f7608fc5e6c8a70df3ce31406feee70a42458ba.zip
op-kernel-dev-2f7608fc5e6c8a70df3ce31406feee70a42458ba.tar.gz
iscsi class: fix get_host_stats error handling
iscsi_get_host_stats was dropping the error code returned by drivers like qla4xxx. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index b481e62..14bfa53 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -3467,6 +3467,10 @@ iscsi_get_host_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh)
memset(buf, 0, host_stats_size);
err = transport->get_host_stats(shost, buf, host_stats_size);
+ if (err) {
+ kfree(skbhost_stats);
+ goto exit_host_stats;
+ }
actual_size = nlmsg_total_size(sizeof(*ev) + host_stats_size);
skb_trim(skbhost_stats, NLMSG_ALIGN(actual_size));
OpenPOWER on IntegriCloud