[lkml]   [2004]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core
    On Mon, Jan 26, 2004 at 05:22:41PM +0100, Roman Zippel wrote:
    > For example pci drivers currently do something like:
    > int init()
    > {
    > if (pci_register_driver(drv) < 0)
    > pci_unregister_driver(drv);
    > }
    > void exit()
    > {
    > pci_unregister_driver(drv);
    > }

    I'd like to take this opportunity to mention that the above is buggy
    as written. If pci_register_driver() fails, the device_driver structure
    is not registered, and therefore pci_unregister_driver() may cause
    Bad Things(tm) to happen.

    (and yes, pci_module_init() is buggy as it currently stands, and I
    believe GregKH has a patch in his queue from the stability freeze
    from yours truely to fix it.)

    Russell King
    Linux kernel 2.6 ARM Linux -
    maintainer of: 2.6 PCMCIA -
    2.6 Serial core
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:00    [W:0.020 / U:50.472 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site