From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] video: fbdev: vesafb: add missed release_region
Date: Wed, 15 Jan 2020 15:50:16 +0100 [thread overview]
Message-ID: <69c018bc-b51b-0eab-39bc-6cd14a0245e5@samsung.com> (raw)
In-Reply-To: <20191205160712.32245-1-hslester96@gmail.com>
On 12/5/19 5:07 PM, Chuhong Yuan wrote:
> The driver forgets to free the requested irq in remove and probe
> failure.
This is I/O region not IRQ.
> Add the missed calls to fix it.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
> Changes in v2:
> - Modify commit message.
>
> drivers/video/fbdev/vesafb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c
> index d9c08f6c2155..fbb196a8bbf6 100644
> --- a/drivers/video/fbdev/vesafb.c
> +++ b/drivers/video/fbdev/vesafb.c
> @@ -468,6 +468,7 @@ static int vesafb_probe(struct platform_device *dev)
> fb_info(info, "%s frame buffer device\n", info->fix.id);
> return 0;
> err:
> + release_region(0x3c0, 32);
There is one 'goto err;' instance before request_region() which
needs to be taken care of first.
> arch_phys_wc_del(par->wc_cookie);
> if (info->screen_base)
> iounmap(info->screen_base);
> @@ -480,6 +481,7 @@ static int vesafb_remove(struct platform_device *pdev)
> {
> struct fb_info *info = platform_get_drvdata(pdev);
>
> + release_region(0x3c0, 32);
> unregister_framebuffer(info);
The order of operations on remove should be the reverse of
order of operations on probe.
[ We cannot release I/O region while framebuffer is active. ]
> framebuffer_release(info);
Please fix the patch and re-submit.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-01-15 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191205160725eucas1p226595a8d3043f48183a0a646bda61b4c@eucas1p2.samsung.com>
2019-12-05 16:07 ` [PATCH v2] video: fbdev: vesafb: add missed release_region Chuhong Yuan
2020-01-15 14:50 ` Bartlomiej Zolnierkiewicz [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=69c018bc-b51b-0eab-39bc-6cd14a0245e5@samsung.com \
--to=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hslester96@gmail.com \
--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).