linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] fbdev/hpfb: Fix an error handling path in hpfb_dio_probe()
Date: Thu, 1 Aug 2024 22:48:03 +0200	[thread overview]
Message-ID: <69fb1b80-cddf-49d6-952d-1fb33dbdb2c0@gmx.de> (raw)
In-Reply-To: <ec4a9fbbff184e40d50e1f12e6df161ff5119f21.1722544445.git.christophe.jaillet@wanadoo.fr>

On 8/1/24 22:34, Christophe JAILLET wrote:
> If an error occurs after request_mem_region(), a corresponding
> release_mem_region() should be called, as already done in the remove
> function.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

I've applied it as-is (with the Fixes tag) to the fbdev git tree.
Thank you, Christophe!

Helge

> ---
> *Not* even compile tested only.
> It is provided as-is
>
> Changes in v2:
>    - Apply a minimal change   [Helge Deller]
>
> v1: https://lore.kernel.org/all/dc4fe3d857849ac63131c5620f1bacf1a3d7172e.1722191367.git.christophe.jaillet@wanadoo.fr/
> ---
>   drivers/video/fbdev/hpfb.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c
> index 66fac8e5393e..a1144b150982 100644
> --- a/drivers/video/fbdev/hpfb.c
> +++ b/drivers/video/fbdev/hpfb.c
> @@ -345,6 +345,7 @@ static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
>   	if (hpfb_init_one(paddr, vaddr)) {
>   		if (d->scode >= DIOII_SCBASE)
>   			iounmap((void *)vaddr);
> +		release_mem_region(d->resource.start, resource_size(&d->resource));
>   		return -ENOMEM;
>   	}
>   	return 0;


      reply	other threads:[~2024-08-01 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 20:34 [PATCH v2] fbdev/hpfb: Fix an error handling path in hpfb_dio_probe() Christophe JAILLET
2024-08-01 20:48 ` Helge Deller [this message]

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=69fb1b80-cddf-49d6-952d-1fb33dbdb2c0@gmx.de \
    --to=deller@gmx.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).