Patch "ata: pata_isapnp: Add missing error check for devm_ioport_map()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ata: pata_isapnp: Add missing error check for devm_ioport_map()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ata-pata_isapnp-add-missing-error-check-for-devm_iop.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1bdd4d8ccf31add3e0629389c82b43fb66077eb4
Author: Chen Ni <nichen@xxxxxxxxxxx>
Date:   Tue Oct 31 04:00:07 2023 +0000

    ata: pata_isapnp: Add missing error check for devm_ioport_map()
    
    [ Upstream commit a6925165ea82b7765269ddd8dcad57c731aa00de ]
    
    Add missing error return check for devm_ioport_map() and return the
    error if this function call fails.
    
    Fixes: 0d5ff566779f ("libata: convert to iomap")
    Signed-off-by: Chen Ni <nichen@xxxxxxxxxxx>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
    Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 25a63d043c8e1..0f77e04240661 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux