input: misc: fix error path for hbtp touch driver

Fix error path for hbtp touch driver where error
variable is not given proper error code while bailing
out from the function.

Change-Id: I56e2654ecffb021a60dd07ea5b5afe45a70a1c85
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
This commit is contained in:
Shantanu Jain 2017-05-10 15:02:58 +05:30 committed by Gerrit - the friendly Code Review server
parent 3a360dc173
commit c7ac4db6b5

View file

@ -1479,6 +1479,7 @@ static int __init hbtp_init(void)
sensor_kobject = kobject_create_and_add("hbtpsensor", kernel_kobj); sensor_kobject = kobject_create_and_add("hbtpsensor", kernel_kobj);
if (!sensor_kobject) { if (!sensor_kobject) {
pr_err("%s: Could not create hbtpsensor kobject\n", __func__); pr_err("%s: Could not create hbtpsensor kobject\n", __func__);
error = -ENOMEM;
goto err_kobject_create; goto err_kobject_create;
} }