diff options
author | Fugang Duan <b38611@freescale.com> | 2015-12-03 18:07:13 +0800 |
---|---|---|
committer | Octavian Purdila <octavian.purdila@nxp.com> | 2017-02-23 14:21:42 +0200 |
commit | d95c122ce2709e119b73c78174232fbbd66a4d76 (patch) | |
tree | 23aa41bfa6ba30ad7d388ae2d8c4a361a7d72429 /drivers/input | |
parent | 510f16b59f6c85ce6fe1841c8b43754a126814e4 (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); |