intel_menlow: fix memory leaks in error path
authorAxel Lin <axel.lin@gmail.com>
Fri, 21 May 2010 09:10:33 +0000 (17:10 +0800)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:40 +0000 (09:48 -0400)
commit4b30fbca4f64bc70c59867ad5769c37efb587ff4
tree8611f640ba3f855935f0be5f0ea2aa1c0b77e86e
parent9fe6206f400646a2322096b56c59891d530e8d51
intel_menlow: fix memory leaks in error path

This patch includes below fixes in error path:
1. fix a memory leak if device_create_file failed in
intel_menlow_add_one_attribute
2. properly free added attributes before return error in
intel_menlow_register_sensor error handler
3. properly call acpi_bus_unregister_driver before return error in
intel_menlow_module_init

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/intel_menlow.c