diff options
author | Tomas Henzl <thenzl@redhat.com> | 2014-07-30 17:12:22 +0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-08-01 16:16:40 +0400 |
commit | 6f8f31c7a890283bea85c7aac45f089b5766472d (patch) | |
tree | 6b979d0b2ac3faa855d6ccab16df3f8982ca1614 /drivers/scsi/pm8001/pm8001_hwi.c | |
parent | 5bd355ee3b0191c6846918b049b3940182bec1cb (diff) | |
download | linux-6f8f31c7a890283bea85c7aac45f089b5766472d.tar.xz |
pm8001: fix pm8001_store_update_fw
The current implementation may mix the negative value returned from
pm8001_set_nvmd with count. -(-ENOMEM) could be interpreted as bytes
programmed, this patch fixes it.
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_hwi.c')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_hwi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 173831016f5f..dd12c6fe57a6 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -4824,7 +4824,7 @@ int pm8001_chip_set_nvmd_req(struct pm8001_hba_info *pm8001_ha, rc = pm8001_tag_alloc(pm8001_ha, &tag); if (rc) { kfree(fw_control_context); - return rc; + return -EBUSY; } ccb = &pm8001_ha->ccb_info[tag]; ccb->fw_control_context = fw_control_context; @@ -4946,7 +4946,7 @@ pm8001_chip_fw_flash_update_req(struct pm8001_hba_info *pm8001_ha, rc = pm8001_tag_alloc(pm8001_ha, &tag); if (rc) { kfree(fw_control_context); - return rc; + return -EBUSY; } ccb = &pm8001_ha->ccb_info[tag]; ccb->fw_control_context = fw_control_context; |