diff options
author | Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> | 2010-04-08 13:12:02 +0530 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2010-09-02 22:45:05 -0600 |
commit | d5c46ce38ef806d417fb510ee25acc9d223b1470 (patch) | |
tree | 97c997ac7f6eea57040a723561d00e5027d4d5a8 /drivers/input | |
parent | 1230dde0e44a0502fa4009d9f742f8d239b9ba04 (diff) |
Coverity fix for Dual Touch support
Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/u8500_tsc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/u8500_tsc.c b/drivers/input/touchscreen/u8500_tsc.c index 609483fd9f4..1cbd4165411 100644 --- a/drivers/input/touchscreen/u8500_tsc.c +++ b/drivers/input/touchscreen/u8500_tsc.c @@ -61,7 +61,6 @@ struct u8500_tsc_data *pdev_data; static ssize_t touchp_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) { - int error = 0; u8 timeout = 0; u8 sys_th_on = 0; u8 sys_th_off = 0; @@ -76,7 +75,7 @@ static ssize_t touchp_attr_show(struct kobject *kobj, sys_th_off = th_off; sprintf(buf, "%d\n", sys_th_off); } - return error == 0 ? strlen(buf) : 0; + return strlen(buf); } static ssize_t touchp_attr_store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t len) @@ -1439,13 +1438,15 @@ static int __exit tp_remove(struct i2c_client *client) if (data->touchp_tsk) kthread_stop(data->touchp_tsk); - if (data->chip) { + if (data->chip != NULL) { data->chip->irq_exit(); data->chip->pirq_dis(); data->chip->cs_dis(); } - if (data->href_v1_flag) - gpio_free(data->chip->irq); + if (data->href_v1_flag != 0) { + if (data->chip != NULL) + gpio_free(data->chip->irq); + } input_unregister_device(data->pin_dev); input_free_device(data->pin_dev); kfree(data); |