diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-23 17:45:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-23 17:45:49 -0800 |
commit | f1a09972a45ae63efbd1587337c4be13b1893330 (patch) | |
tree | c4f07eae7347c9dafdac7da07df05be2877a6245 | |
parent | bc893f744ef04e118f7bcf848fd33f8016b63f7d (diff) | |
parent | a6925165ea82b7765269ddd8dcad57c731aa00de (diff) |
Merge tag 'ata-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ata fix from Damien Le Moal:
- Add a missing error check in the adapter initialization of the
pata_isapnp driver (Chen)
* tag 'ata-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
ata: pata_isapnp: Add missing error check for devm_ioport_map()
-rw-r--r-- | drivers/ata/pata_isapnp.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |