All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Marek Vasut <marex@denx.de>
Cc: linux-input@vger.kernel.org, ch@denx.de,
	Joe Hung <joe_hung@ilitek.com>, Luca Hsu <luca_hsu@ilitek.com>
Subject: Re: [PATCH v3 3/3] Input: ili210x - add ili251x firmware update support
Date: Sat, 16 Oct 2021 22:26:49 -0700	[thread overview]
Message-ID: <YWu0GWttNy9FWrfo@google.com> (raw)
In-Reply-To: <20210831202506.181927-3-marex@denx.de>

On Tue, Aug 31, 2021 at 10:25:06PM +0200, Marek Vasut wrote:
> +
> +	/* DF end address is the last address in the firmware blob */
> +	*df_end = fw_addr + fw_len;
> +	*buf = fw_buf;
> +	release_firmware(fw);
> +	return 0;
> +err_big:
> +	kfree(fw_buf);
> +err_alloc:
> +	release_firmware(fw);
> +	return error;

I do not quite like that we have to release firmware in both success
and error paths, so I moved the call to request_ihex_firmware() to the
caller of this function and release it before checking the result of
loading the firmware to buffer, and applied.

Thank you.

-- 
Dmitry

  reply	other threads:[~2021-10-17  5:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 20:25 [PATCH v3 1/3] Input: ili210x - use resolution from ili251x firmware Marek Vasut
2021-08-31 20:25 ` [PATCH v3 2/3] Input: ili210x - export ili251x version details via sysfs Marek Vasut
2021-10-17  5:23   ` Dmitry Torokhov
2021-08-31 20:25 ` [PATCH v3 3/3] Input: ili210x - add ili251x firmware update support Marek Vasut
2021-10-17  5:26   ` Dmitry Torokhov [this message]
2021-10-17 14:27     ` Marek Vasut
2021-10-16 19:50 ` [PATCH v3 1/3] Input: ili210x - use resolution from ili251x firmware Marek Vasut
2021-10-17  5:23 ` Dmitry Torokhov

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=YWu0GWttNy9FWrfo@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=ch@denx.de \
    --cc=joe_hung@ilitek.com \
    --cc=linux-input@vger.kernel.org \
    --cc=luca_hsu@ilitek.com \
    --cc=marex@denx.de \
    /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.