From: sashiko-bot@kernel.org
To: "Daniel Matyas" <matyasdaniel006@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] video: fbdev: Request IO ports
Date: Wed, 11 Nov 2026 16:14:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-209267@kernel.org> (raw)
In-Reply-To: <20261111150219.239706-1-matyasdaniel006@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] fbdev: n411: devm_request_region() in n411_init() breaks
hecubafb probing
- [Medium] fbdev: n411: leak of n411_device and I/O regions in
n411_init() on error
--
commit 233a6d07f214976aca6e2d815559082f7aaf9dc7
Author: Daniel Matyas <matyasdaniel006@gmail.com>
video: fbdev: Request IO ports
This commit requests the I/O port regions used by the arcfb and n411
framebuffer drivers via devm_request_region().
> diff --git a/drivers/video/fbdev/n411.c b/drivers/video/fbdev/n411.c
> index a3677313396e2..ed0281939d37d 100644
> --- a/drivers/video/fbdev/n411.c
> +++ b/drivers/video/fbdev/n411.c
> @@ -165,6 +165,11 @@ static int __init n411_init(void)
> if (!n411_device)
> return -ENOMEM;
>
> + if (!devm_request_region(&n411_device->dev, dio_addr, 1, "n411") ||
> + !devm_request_region(&n411_device->dev, cio_addr, 1, "n411") ||
> + !devm_request_region(&n411_device->dev, c2io_addr, 1, "n411"))
[Severity: High]
Does calling devm_request_region() on &n411_device->dev before
platform_device_add() prevent the hecubafb driver from binding to
n411_device?
Each devm_request_region() call adds an entry to
n411_device->dev.devres_head. When platform_device_add(n411_device) later
attempts to bind the driver, really_probe() rejects any device that already
has devres entries:
drivers/base/dd.c:really_probe() {
...
if (!list_empty(&dev->devres_head)) {
dev_crit(dev, "Resources present before probing\n");
ret = -EBUSY;
goto done;
}
...
}
As a result, probing always fails with -EBUSY and the display device remains
unbound.
> + return -EBUSY;
[Severity: Medium]
Does returning -EBUSY directly here leak n411_device and any I/O port
regions already claimed by the preceding devm_request_region() calls?
Jumping to put_plat_device instead would call platform_device_put() and
release the allocated device and its managed resources.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111150219.239706-1-matyasdaniel006@gmail.com?part=1
prev parent reply other threads:[~2026-11-11 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 15:02 [PATCH] video: fbdev: Request IO ports Daniel Matyas
2026-11-11 16:14 ` sashiko-bot [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=sashiko-outbox-209267@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=matyasdaniel006@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.