Hello, Sorry, I got the order of operation wrong. Can you please test this one? Thanks. diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index bce2a8c..3a0bb89 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -962,6 +962,9 @@ static __init int legacy_init_one(struct legacy_probe *probe) if (IS_ERR(pdev)) return PTR_ERR(pdev); + if (!devres_open_group(&pdev->dev, legacy_init_one, GFP_KERNEL)) + return -ENOMEM; + ret = -EBUSY; if (devm_request_region(&pdev->dev, io, 8, "pata_legacy") == NULL || devm_request_region(&pdev->dev, io + 0x0206, 1, @@ -1008,11 +1011,13 @@ static __init int legacy_init_one(struct legacy_probe *probe) if (!ata_dev_absent(dev)) { legacy_host[probe->slot] = host; ld->platform_dev = pdev; + devres_remove_group(&pdev->dev, legacy_init_one); return 0; } } ata_host_detach(host); fail: + devres_release_group(&pdev->dev, legacy_init_one); platform_device_unregister(pdev); return ret; } -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html