summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-10-22 12:23:24 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-10-25 03:17:16 +0200
commit906ca6353ac09696c1bf0892513c8edffff5e0a6 (patch)
tree54e75c94e1d1c253e69cbf6cbb5b4d452dbdd348 /drivers/scsi/esas2r
parentscsi: cxgb4i: remove set but not used variable 'ppmax' (diff)
downloadlinux-906ca6353ac09696c1bf0892513c8edffff5e0a6.tar.xz
linux-906ca6353ac09696c1bf0892513c8edffff5e0a6.zip
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')
-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;
}