From: Bradley Grove <bgrove@attotech.com>
To: Tomas Henzl <thenzl@redhat.com>,
linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH 2/3] esas2r: fix an error path in esas2r_ioctl_handler
Date: Mon, 24 Nov 2014 15:56:16 -0500 [thread overview]
Message-ID: <54739B70.5030401@attotech.com> (raw)
In-Reply-To: <1416144934-21338-3-git-send-email-thenzl@redhat.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Thanks,
Brad
On 11/16/2014 08:35 AM, Tomas Henzl wrote:
> Is seems strange to manipulate nvram_semaphore when in this place,
> this patch fixes it.
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
> drivers/scsi/esas2r/esas2r_ioctl.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
> index 9ac8207554..c88b9f9491 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)
>
> 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,
>
next prev parent reply other threads:[~2014-11-24 21:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-16 13:35 [PATCH 0/3] esas2r: few minor fixes Tomas Henzl
2014-11-16 13:35 ` [PATCH 1/3] esas2r: fir error handling in do_fm_api Tomas Henzl
2014-11-24 20:53 ` Bradley Grove
2014-11-16 13:35 ` [PATCH 2/3] esas2r: fix an error path in esas2r_ioctl_handler Tomas Henzl
2014-11-24 20:56 ` Bradley Grove [this message]
2014-11-16 13:35 ` [PATCH 3/3] esas2r: fix an oversight in setting return value Tomas Henzl
2014-11-24 20:58 ` Bradley Grove
2014-11-24 20:58 ` Bradley Grove
2014-11-25 14:43 ` [PATCH 0/3] esas2r: few minor fixes Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54739B70.5030401@attotech.com \
--to=bgrove@attotech.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).