aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTomas Henzl <thenzl@redhat.com>2014-07-07 11:19:59 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:17:05 -0400
commit31d05e5b14f362c7ea99d1d9e977771ef434b820 (patch)
tree50148ca973da063718f33e5226ee08c5dc770c35 /drivers/scsi
parent9422e864fa4e2d323407cfca6ca14712cf17fb40 (diff)
pm8001: fix update_flash
The driver checks the return valu, but after he tries to wait_for_completion which might never happen. Also the ioctl buffer is freed at the end of the function, so the first removal is not needed. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/pm8001/pm8001_ctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index ade62c8a19fa..d3a08aea0948 100644
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -617,11 +617,11 @@ static int pm8001_update_flash(struct pm8001_hba_info *pm8001_ha)
617 617
618 pm8001_ha->nvmd_completion = &completion; 618 pm8001_ha->nvmd_completion = &completion;
619 ret = PM8001_CHIP_DISP->fw_flash_update_req(pm8001_ha, payload); 619 ret = PM8001_CHIP_DISP->fw_flash_update_req(pm8001_ha, payload);
620 if (ret)
621 break;
620 wait_for_completion(&completion); 622 wait_for_completion(&completion);
621 if (ret || (fwControl->retcode > FLASH_UPDATE_IN_PROGRESS)) { 623 if (fwControl->retcode > FLASH_UPDATE_IN_PROGRESS) {
622 ret = fwControl->retcode; 624 ret = fwControl->retcode;
623 kfree(ioctlbuffer);
624 ioctlbuffer = NULL;
625 break; 625 break;
626 } 626 }
627 } 627 }