kernel-fxtec-pro1x/drivers/platform/x86
Axel Lin a0dba697ee acerhdf: fix resource reclaim in error path
Fix resource reclaim in below cases:

1. acerhdf_register_platform() does not properly handle
   platform_device_alloc() failure and platform_device_add() failure This
   patch adds error handing for acerhdf_register_platform().

2. acerhdf_register_platform() return err with acerhdf_dev == NULL.
   as a result, acerhdf_unregister_platform() does not do resource reclaim
   in acerhdf_init() error path.  This patch adds error handing for
   acerhdf_register_platform(), thus correct the error handing path in
   acerhdf_init().  goto out_err instead of err_unreg if
   acerhdf_register_platform() fail.

3. platform_device_del() should only used in error handling.  Current
   implementation missed a platform_device_put() in acerhdf_exit.  This
   patch fixes it by using platform_device_unregister() instead of
   platform_device_del() in acerhdf_unregister_platform.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Acked-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2010-08-03 09:49:01 -04:00
..
acer-wmi.c acer-wmi: make dmi_matched to return 1 instead of 0 2010-08-03 09:48:52 -04:00
acerhdf.c acerhdf: fix resource reclaim in error path 2010-08-03 09:49:01 -04:00
asus-laptop.c asus-laptop: return proper error for store_ledd if write_acpi_int fail 2010-08-03 09:49:01 -04:00
asus_acpi.c asus_acpi: fix coding style to improve readability 2010-08-03 09:48:58 -04:00
classmate-laptop.c classmate-laptop: make needlessly global symbols static 2010-08-03 09:48:59 -04:00
compal-laptop.c compal-laptop/fujitsu-laptop/msi-laptop: make dmi_check_cb to return 1 instead of 0 2010-08-03 09:48:57 -04:00
dell-laptop.c dell-laptop: Add another Dell laptop family to the DMI whitelist 2010-08-03 09:48:49 -04:00
dell-wmi.c dell-wmi: fix a memory leak 2010-08-03 09:48:53 -04:00
eeepc-laptop.c eeepc-laptop: add missing sparse_keymap_free 2010-04-23 15:23:21 -04:00
eeepc-wmi.c drivers/platform/x86/eeepc-wmi.c: fix build warning 2010-05-20 09:46:24 -04:00
fujitsu-laptop.c fujitsu-laptop: make needlessly global symbols static 2010-08-03 09:49:00 -04:00
hp-wmi.c hp-wmi: return -ENODEV if BIOS does not export any supported hp wmi guid 2010-08-03 09:48:54 -04:00
intel_ips.c X86: intel_ips, check for kzalloc properly 2010-08-03 09:48:48 -04:00
intel_menlow.c intel_menlow: fix memory leaks in error path 2010-08-03 09:48:40 -04:00
intel_rar_register.c rar: Move the RAR driver into the right place as its now clean 2010-08-03 09:48:50 -04:00
intel_scu_ipc.c intel_scu_ipc: Oops/crash fixes 2010-07-19 13:17:37 -07:00
Kconfig compal-laptop: uses hwmon interfaces, depends on HWMON 2010-08-03 09:48:57 -04:00
Makefile rar: Move the RAR driver into the right place as its now clean 2010-08-03 09:48:50 -04:00
msi-laptop.c msi-laptop: make struct rfkill_ops const 2010-08-03 09:49:00 -04:00
msi-wmi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
panasonic-laptop.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sony-laptop.c sony-laptop: use platform_device_unregister in sony_pf_remove 2010-08-03 09:48:53 -04:00
tc1100-wmi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
thinkpad_acpi.c thinkpad-acpi: document backlight level writeback at driver init 2010-05-16 19:45:57 -03:00
topstar-laptop.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
toshiba_acpi.c toshiba-acpi: Add an extra couple of keys 2010-08-03 09:48:53 -04:00
toshiba_bluetooth.c ACPI: replace acpi_integer by u64 2010-01-28 01:47:33 -05:00
wmi.c wmi: fix a memory leak in wmi_notify_debug 2010-08-03 09:48:51 -04:00