Skip to content

Commit

Permalink
esas2r: fix an error path in esas2r_ioctl_handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Henzl authored and Christoph Hellwig committed Nov 25, 2014
1 parent ddcae01 commit ba9e587
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/scsi/esas2r/esas2r_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,9 +1420,10 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)

rq = esas2r_alloc_request(a);
if (rq == NULL) {
up(&a->nvram_semaphore);
ioctl->data.prw.code = 0;
break;
kfree(ioctl);
esas2r_log(ESAS2R_LOG_WARN,
"could not allocate an internal request");
return -ENOMEM;
}

code = esas2r_write_params(a, rq,
Expand Down

0 comments on commit ba9e587

Please sign in to comment.