summaryrefslogtreecommitdiff
path: root/drivers/scsi/esas2r/esas2r_flash.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-10-22 13:23:24 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-24 21:17:16 -0400
commit906ca6353ac09696c1bf0892513c8edffff5e0a6 (patch)
tree54e75c94e1d1c253e69cbf6cbb5b4d452dbdd348 /drivers/scsi/esas2r/esas2r_flash.c
parente07734fdee7800b5ca7f24fa4e3f0b0ea13845ba (diff)
scsi: esas2r: unlock on error in esas2r_nvram_read_direct()
This error path is missing an unlock. Fixes: 26780d9e12ed ("[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver") Link: https://lore.kernel.org/r/20191022102324.GA27540@mwanda Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_flash.c')
-rw-r--r--drivers/scsi/esas2r/esas2r_flash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/esas2r/esas2r_flash.c b/drivers/scsi/esas2r/esas2r_flash.c
index 7bd376d95ed5..b02ac389e6c6 100644
--- a/drivers/scsi/esas2r/esas2r_flash.c
+++ b/drivers/scsi/esas2r/esas2r_flash.c
@@ -1197,6 +1197,7 @@ bool esas2r_nvram_read_direct(struct esas2r_adapter *a)
if (!esas2r_read_flash_block(a, a->nvram, FLS_OFFSET_NVR,
sizeof(struct esas2r_sas_nvram))) {
esas2r_hdebug("NVRAM read failed, using defaults");
+ up(&a->nvram_semaphore);
return false;
}