Re: [Pcihpd-discuss] Re: [patch 0/4] Hot Dock/Undock support

From: Pavel Machek
Date: Wed Jan 18 2006 - 15:42:12 EST


Hi!

There's a bug in error handling:

int __init acpiphp_glue_init(void)
{
int num = 0;

acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, find_root_bridges, &num,
NULL);

if (num <= 0)
return -1;
else
acpi_pci_register_driver(&acpi_pci_hp_driver);

return 0;
}

You register driver here, but if acpiphp_get_num_slots() returns 0
later, you return -ENODEV, aborting load of driver, but without
undergistering that driver. It oopses after a while. Same problem if
init_slots() returns error.

Pavel
--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/