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 1/3] esas2r: fir error handling in do_fm_api
Date: Mon, 24 Nov 2014 15:53:35 -0500 [thread overview]
Message-ID: <54739ACF.5040906@attotech.com> (raw)
In-Reply-To: <1416144934-21338-2-git-send-email-thenzl@redhat.com>
Looks good.
Acked-by: Bradley Grove <bgrove@attotech.com>
Thanks,
Brad
On 11/16/2014 08:35 AM, Tomas Henzl wrote:
> This patch fixes an error path and rearranges error handling.
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
> drivers/scsi/esas2r/esas2r_ioctl.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
> index d89a0277a8..9ac8207554 100644
> --- a/drivers/scsi/esas2r/esas2r_ioctl.c
> +++ b/drivers/scsi/esas2r/esas2r_ioctl.c
> @@ -117,9 +117,8 @@ static void do_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi)
>
> rq = esas2r_alloc_request(a);
> if (rq == NULL) {
> - up(&a->fm_api_semaphore);
> fi->status = FI_STAT_BUSY;
> - return;
> + goto free_sem;
> }
>
> if (fi == &a->firmware.header) {
> @@ -135,7 +134,7 @@ static void do_fm_api(struct esas2r_adapter *a, struct esas2r_flash_img *fi)
> if (a->firmware.header_buff == NULL) {
> esas2r_debug("failed to allocate header buffer!");
> fi->status = FI_STAT_BUSY;
> - return;
> + goto free_req;
> }
>
> memcpy(a->firmware.header_buff, fi,
> @@ -171,9 +170,10 @@ all_done:
> a->firmware.header_buff,
> (dma_addr_t)a->firmware.header_buff_phys);
> }
> -
> - up(&a->fm_api_semaphore);
> +free_req:
> esas2r_free_request(a, (struct esas2r_request *)rq);
> +free_sem:
> + up(&a->fm_api_semaphore);
> return;
>
> }
>
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 [this message]
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
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=54739ACF.5040906@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.