Skip to content

Commit f1a0997

Browse files
committed
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()
2 parents bc893f7 + a692516 commit f1a0997

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/ata/pata_isapnp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
8282
if (pnp_port_valid(idev, 1)) {
8383
ctl_addr = devm_ioport_map(&idev->dev,
8484
pnp_port_start(idev, 1), 1);
85+
if (!ctl_addr)
86+
return -ENOMEM;
87+
8588
ap->ioaddr.altstatus_addr = ctl_addr;
8689
ap->ioaddr.ctl_addr = ctl_addr;
8790
ap->ops = &isapnp_port_ops;

0 commit comments

Comments
 (0)