summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/toshiba_acpi.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-07-20 15:19:49 -0700
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:49:01 -0400
commita0dba697eec78fb2d4e2b76b83104a2b251ae70d (patch)
treef15804af288681c2bb58fcd7f13e6aeacea935ff /drivers/platform/x86/toshiba_acpi.c
parent6a984a06487129f013ee2df6ce98b6cfada1e7b1 (diff)
downloadlinux-a0dba697eec78fb2d4e2b76b83104a2b251ae70d.tar.bz2
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>
Diffstat (limited to 'drivers/platform/x86/toshiba_acpi.c')
0 files changed, 0 insertions, 0 deletions