summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-07-05 03:30:10 +0400
committerMatthew Garrett <mjg@redhat.com>2012-07-28 08:28:55 +0400
commit1bfaf1d5bcfb2ae0b7b90c5aed86909ee4f3f099 (patch)
tree81ce7e33bda2146faff3da9dcc954cea73feb7f7 /drivers/platform
parent24237c43aade30758aacabbf0e462fca19c48231 (diff)
downloadlinux-1bfaf1d5bcfb2ae0b7b90c5aed86909ee4f3f099.tar.xz
ACER: Fix Smatch double-free issue
The patch 6ae3a0876185: "ACER: Add support for accelerometer sensor" from Jun 1, 2012, leads to the following Smatch warning: drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy() error: don't call input_free_device() after input_unregister_device() drivers/platform/x86/acer-wmi.c 1883 static void acer_wmi_accel_destroy(void) 1884 { 1885 input_unregister_device(acer_wmi_accel_dev); 1886 input_free_device(acer_wmi_accel_dev); 1887 } Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Fengguang Wu <wfg@linux.intel.com> Cc: joeyli <jlee@suse.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/acer-wmi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index cdee5ecf4bf6..3782e1cd3697 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -1883,7 +1883,6 @@ err_free_dev:
static void acer_wmi_accel_destroy(void)
{
input_unregister_device(acer_wmi_accel_dev);
- input_free_device(acer_wmi_accel_dev);
}
static int __init acer_wmi_input_setup(void)