aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r/esas2r_ioctl.c
diff options
context:
space:
mode:
authorTomas Henzl <thenzl@redhat.com>2014-11-16 08:35:33 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-25 09:42:52 -0500
commitba9e5874b2f4a191cdd9de8a7ea96344458c1ab7 (patch)
tree820f168b33981b1f02f2864d9833e06b8d5738bd /drivers/scsi/esas2r/esas2r_ioctl.c
parentddcae01746b2eefadc78257ca57e327bc9fba791 (diff)
esas2r: fix an error path in esas2r_ioctl_handler
Is seems strange to manipulate nvram_semaphore when in this place, this patch fixes it. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_ioctl.c')
-rw-r--r--drivers/scsi/esas2r/esas2r_ioctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
index 9ac82075546a..c88b9f9491b5 100644
--- a/drivers/scsi/esas2r/esas2r_ioctl.c
+++ b/drivers/scsi/esas2r/esas2r_ioctl.c
@@ -1420,9 +1420,10 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
1420 1420
1421 rq = esas2r_alloc_request(a); 1421 rq = esas2r_alloc_request(a);
1422 if (rq == NULL) { 1422 if (rq == NULL) {
1423 up(&a->nvram_semaphore); 1423 kfree(ioctl);
1424 ioctl->data.prw.code = 0; 1424 esas2r_log(ESAS2R_LOG_WARN,
1425 break; 1425 "could not allocate an internal request");
1426 return -ENOMEM;
1426 } 1427 }
1427 1428
1428 code = esas2r_write_params(a, rq, 1429 code = esas2r_write_params(a, rq,