diff options
author | Fugang Duan <b38611@freescale.com> | 2015-12-03 18:07:13 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:02:40 -0600 |
commit | 70049a4d95e48ad695868ac194dd8e378eb129b2 (patch) | |
tree | 0d8c78cd30dc54437d48028e9e0688d1d2908537 /drivers/input | |
parent | a63d43fc9d808a5012bf6382ebf1d9bd8094236f (diff) |
MLK-11957 input: misc: fxls8471: remove unnecessary .kfree()
The driver kfree the global memory that is not correct. The patch
remove them.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/fxls8471.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/input/misc/fxls8471.c b/drivers/input/misc/fxls8471.c index 0b4b00503ee1..e77ef1b137a3 100644 --- a/drivers/input/misc/fxls8471.c +++ b/drivers/input/misc/fxls8471.c @@ -496,7 +496,7 @@ int fxls8471_driver_init(struct fxls8471_data *pdata) result = misc_register(&fxls8471_device); if (result != 0) { printk(KERN_ERR "register acc miscdevice error"); - goto err_regsiter_misc; + goto err_out; } result = @@ -548,8 +548,6 @@ err_alloc_input_device: &fxls8471_attr_group); err_create_sysfs: misc_deregister(&fxls8471_device); -err_regsiter_misc: - kfree(pdata); err_out: return result; } @@ -559,8 +557,7 @@ int fxls8471_driver_remove(struct fxls8471_data *pdata) { fxls8471_change_mode(pdata, STANDBY); misc_deregister(&fxls8471_device); - if (pdata != NULL) - kfree(pdata); + return 0; } EXPORT_SYMBOL_GPL(fxls8471_driver_remove); |