diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-05-19 06:17:39 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-06-05 10:27:13 -0400 |
commit | b21417820f8f659a6b73cc937ab39bf77d350ce6 (patch) | |
tree | 03395a47a57590d930d5d60585395c842c7dd9ec /drivers/s390/scsi | |
parent | 9dfe1cc36be27040144238d30da05053db71beb1 (diff) |
[SCSI] zfcp: Fix fsf_status_read return code handling
If allocation of a status buffer failed the function incorrectly
returned 0 instead of -ENOMEM.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index b344e8a72f1f..2f27d03e61c2 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -712,7 +712,7 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags) | |||
712 | struct fsf_status_read_buffer *status_buffer; | 712 | struct fsf_status_read_buffer *status_buffer; |
713 | unsigned long lock_flags; | 713 | unsigned long lock_flags; |
714 | volatile struct qdio_buffer_element *sbale; | 714 | volatile struct qdio_buffer_element *sbale; |
715 | int retval = 0; | 715 | int retval; |
716 | 716 | ||
717 | /* setup new FSF request */ | 717 | /* setup new FSF request */ |
718 | retval = zfcp_fsf_req_create(adapter, FSF_QTCB_UNSOLICITED_STATUS, | 718 | retval = zfcp_fsf_req_create(adapter, FSF_QTCB_UNSOLICITED_STATUS, |
@@ -731,12 +731,11 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags) | |||
731 | sbale[2].flags |= SBAL_FLAGS_LAST_ENTRY; | 731 | sbale[2].flags |= SBAL_FLAGS_LAST_ENTRY; |
732 | fsf_req->sbale_curr = 2; | 732 | fsf_req->sbale_curr = 2; |
733 | 733 | ||
734 | retval = -ENOMEM; | ||
734 | status_buffer = | 735 | status_buffer = |
735 | mempool_alloc(adapter->pool.data_status_read, GFP_ATOMIC); | 736 | mempool_alloc(adapter->pool.data_status_read, GFP_ATOMIC); |
736 | if (!status_buffer) { | 737 | if (!status_buffer) |
737 | ZFCP_LOG_NORMAL("bug: could not get some buffer\n"); | ||
738 | goto failed_buf; | 738 | goto failed_buf; |
739 | } | ||
740 | memset(status_buffer, 0, sizeof (struct fsf_status_read_buffer)); | 739 | memset(status_buffer, 0, sizeof (struct fsf_status_read_buffer)); |
741 | fsf_req->data = (unsigned long) status_buffer; | 740 | fsf_req->data = (unsigned long) status_buffer; |
742 | 741 | ||