diff options
| author | Shantanu Jain <shjain@codeaurora.org> | 2017-05-09 11:23:14 +0530 |
|---|---|---|
| committer | Shantanu Jain <shjain@codeaurora.org> | 2017-05-09 11:30:24 +0530 |
| commit | 3ffb190bb8905cb69285943ebb8da7600d643ee1 (patch) | |
| tree | 7db060d51896bf91828788d28284ba9770802433 | |
| parent | 3d82d66409abb91539bcb9d1f343fcb9d583f2b4 (diff) | |
input: misc: fix error path for hbtp touch screen driver
Fix error path for hbtp touch screen driver where error
variable is not initialized to a error value before bailing
out from the driver function.
Change-Id: Ife3376891950216971cafaf33fd8308697b7f904
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
| -rw-r--r-- | drivers/input/misc/hbtp_input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/misc/hbtp_input.c b/drivers/input/misc/hbtp_input.c index 599605a3cf76..0362095d4c38 100644 --- a/drivers/input/misc/hbtp_input.c +++ b/drivers/input/misc/hbtp_input.c @@ -1452,8 +1452,10 @@ static int __init hbtp_init(void) hbtp->sensor_data = kzalloc(sizeof(struct hbtp_sensor_data), GFP_KERNEL); - if (!hbtp->sensor_data) + if (!hbtp->sensor_data) { + error = -ENOMEM; goto err_sensordata; + } mutex_init(&hbtp->mutex); mutex_init(&hbtp->sensormutex); |
