From: Damien Le Moal <dlemoal@kernel.org>
To: Chen Ni <nichen@iscas.ac.cn>,
s.shtylyov@omp.ru, jeff@garzik.org, htejun@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pata_isapnp: Add check for devm_ioport_map
Date: Fri, 10 Nov 2023 10:01:25 +0900 [thread overview]
Message-ID: <bbe5e6d2-9622-4f36-b832-450bf56424f9@kernel.org> (raw)
In-Reply-To: <20231031040007.2498659-1-nichen@iscas.ac.cn>
On 10/31/23 13:00, Chen Ni wrote:
> Add check for devm_ioport_map() and return the error if it fails in
> order to guarantee the success of devm_ioport_map().
>
> Fixes: 0d5ff566779f ("libata: convert to iomap")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Apologies for the delay. This fell through the cracks :)
Applied to for-6.7-fixes. I will send this next week.
> ---
> drivers/ata/pata_isapnp.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
> index 25a63d043c8e..0f77e0424066 100644
> --- a/drivers/ata/pata_isapnp.c
> +++ b/drivers/ata/pata_isapnp.c
> @@ -82,6 +82,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
> if (pnp_port_valid(idev, 1)) {
> ctl_addr = devm_ioport_map(&idev->dev,
> pnp_port_start(idev, 1), 1);
> + if (!ctl_addr)
> + return -ENOMEM;
> +
> ap->ioaddr.altstatus_addr = ctl_addr;
> ap->ioaddr.ctl_addr = ctl_addr;
> ap->ops = &isapnp_port_ops;
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2023-11-10 1:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 4:00 [PATCH] pata_isapnp: Add check for devm_ioport_map Chen Ni
2023-10-31 5:13 ` Damien Le Moal
2023-10-31 5:20 ` Damien Le Moal
2023-10-31 15:18 ` Sergey Shtylyov
2023-11-10 1:01 ` Damien Le Moal [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=bbe5e6d2-9622-4f36-b832-450bf56424f9@kernel.org \
--to=dlemoal@kernel.org \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nichen@iscas.ac.cn \
--cc=s.shtylyov@omp.ru \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).