Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba9e5874 authored by Tomas Henzl's avatar Tomas Henzl Committed by Christoph Hellwig
Browse files

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: default avatarTomas Henzl <thenzl@redhat.com>
Acked-by: default avatarBradley Grove <bgrove@attotech.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent ddcae017
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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,