Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mike Christie and committed by
Christoph Hellwig
2f7608fc 7f3976f0

+4
+4
drivers/scsi/scsi_transport_iscsi.c
··· 3467 3467 memset(buf, 0, host_stats_size); 3468 3468 3469 3469 err = transport->get_host_stats(shost, buf, host_stats_size); 3470 + if (err) { 3471 + kfree(skbhost_stats); 3472 + goto exit_host_stats; 3473 + } 3470 3474 3471 3475 actual_size = nlmsg_total_size(sizeof(*ev) + host_stats_size); 3472 3476 skb_trim(skbhost_stats, NLMSG_ALIGN(actual_size));