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>
This commit is contained in:
parent
ddcae01746
commit
ba9e5874b2
|
@ -1420,9 +1420,10 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)
|
||||||
|
|
||||||
rq = esas2r_alloc_request(a);
|
rq = esas2r_alloc_request(a);
|
||||||
if (rq == NULL) {
|
if (rq == NULL) {
|
||||||
up(&a->nvram_semaphore);
|
kfree(ioctl);
|
||||||
ioctl->data.prw.code = 0;
|
esas2r_log(ESAS2R_LOG_WARN,
|
||||||
break;
|
"could not allocate an internal request");
|
||||||
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = esas2r_write_params(a, rq,
|
code = esas2r_write_params(a, rq,
|
||||||
|
|
Loading…
Reference in New Issue