linux/drivers
Henrique de Moraes Holschuh ac36393de6 ACPI: thinkpad-acpi: fix the module init failure path
Thomas Renninger reports that if one tries to load thinkpad-acpi in a
non-thinkpad, one gets:

Call Trace:
 [<ffffffff802fa57d>] kref_get+0x2f/0x36
 [<ffffffff802f97f7>] kobject_get+0x12/0x17
 [<ffffffff8036dfd7>] get_driver+0x14/0x1a
 [<ffffffff8036dfee>] driver_remove_file+0x11/0x32
 [<ffffffff8823b9be>] :thinkpad_acpi:thinkpad_acpi_module_exit+0xa8/0xfc
 [<ffffffff8824b8a0>] :thinkpad_acpi:thinkpad_acpi_module_init+0x74a/0x776
 [<ffffffff8024f968>] __link_module+0x0/0x25
 [<ffffffff80252269>] sys_init_module+0x162c/0x178f
 [<ffffffff8020bc2e>] system_call+0x7e/0x83

So, track if the platform driver and its driver attributes were registered,
and only deallocate them in that case.

This patch is based on Thomas Renninger's patch for the issue.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-03 15:32:58 -04:00
..
acorn/char Remove the arm26 port 2007-07-31 15:39:39 -07:00
acpi ACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again) 2007-07-31 20:40:08 -07:00
amba
ata pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets 2007-08-01 10:00:56 -04:00
atm
auxdisplay
base CPU online file permission 2007-07-31 15:39:39 -07:00
block cciss: fix memory leak 2007-07-31 15:39:43 -07:00
bluetooth
cdrom [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog 2007-07-31 20:43:52 -07:00
clocksource x86_64: fix typo in acpi_pm.c 2007-07-21 18:37:12 -07:00
connector
cpufreq
crypto
dio
dma [NET_DMA]: remove unused dma_memcpy_to_kernel_iovec 2007-07-31 02:28:03 -07:00
edac drivers/edac: fix pasemi kconfig depends 2007-07-26 11:35:18 -07:00
eisa
fc4
firewire Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-22 11:36:49 -07:00
firmware
hid HID: Never call hid_free_buffers() when usbhid_device has been freed 2007-08-02 13:48:04 +02:00
hwmon hwmon: fscher read control bugfix 2007-07-30 21:14:00 -04:00
i2c Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION 2007-07-29 16:45:38 -07:00
ide scc_pata: PIO fixes 2007-08-01 23:46:46 +02:00
ieee1394 raw1394 __user annotation 2007-07-26 11:11:57 -07:00
infiniband in-string typos of "error" 2007-07-31 15:39:40 -07:00
input [MIPS] Fixup secure computing stuff. 2007-07-31 21:35:21 +01:00
isdn Remove 'isdn_* is defined but unused' warnings 2007-07-31 15:39:44 -07:00
kvm KVM: disable writeback for 0x0f 0x01 instructions. 2007-07-25 14:31:27 +03:00
leds
lguest Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n 2007-07-29 17:37:45 -07:00
macintosh [POWERPC] Clean up duplicate includes in drivers/macintosh/ 2007-07-22 21:31:00 +10:00
mca
md md: handle writes to broken raid10 arrays gracefully 2007-07-31 15:39:38 -07:00
media V4L/DVB (5939): dvb-pll: make struct dvb_pll_fcv1236d static 2007-07-30 16:26:37 -03:00
message fix integer overflow warning in i2o_block 2007-07-31 15:39:44 -07:00
mfd
misc ACPI: thinkpad-acpi: fix the module init failure path 2007-08-03 15:32:58 -04:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2007-07-26 14:00:56 -07:00
mtd [MTD] [NAND] nand_base.c: fix type of eccpos pointer 2007-08-02 21:47:01 +01:00
net Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-07-31 15:51:00 -07:00
nubus
of Create drivers/of/platform.c 2007-07-20 14:25:51 +10:00
oprofile [CELL] oprofile: add support to OProfile for profiling CELL BE SPUs 2007-07-20 21:42:24 +02:00
parisc
parport parport_pc locking fix 2007-07-31 15:39:37 -07:00
pci pci: rename __pci_reenable_device() to pci_reenable_device() 2007-08-01 10:00:56 -04:00
pcmcia pcmcia: give socket time to power down 2007-07-31 15:39:38 -07:00
pnp ACPI: restore CONFIG_ACPI_SLEEP 2007-07-29 16:53:59 -07:00
power
ps3
rapidio
rtc rtc-m48t59 driver NO_IRQ mode fixup 2007-07-31 15:39:44 -07:00
s390 Typo fixes errror -> error 2007-07-31 15:39:42 -07:00
sbus Videopix Frame Grabber: Fix unreleased lock in vfc_debug() 2007-07-31 15:39:43 -07:00
scsi drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc 2007-08-01 23:46:45 +02:00
serial sb1250-duart: __maybe_unused, etc. fixes 2007-07-31 15:39:43 -07:00
sh
sn
spi spi device setup gets better error checking 2007-07-31 15:39:44 -07:00
tc
telephony
uio
usb USB: "sparse" cleanups for usb gadgets 2007-07-30 13:27:47 -07:00
video remove tx3912fb 2007-07-31 15:39:41 -07:00
w1 drivers/ misc __iomem annotations 2007-07-26 11:11:57 -07:00
xen xenbus_xs.c: fix a use-after-free 2007-07-26 11:35:17 -07:00
zorro
Kconfig Begin to consolidate of_device.c 2007-07-20 13:39:59 +10:00
Makefile [WATCHDOG] Fix pcwd_init_module crash 2007-07-29 18:58:39 +00:00