In gb_svc_input_create() fn, on failure, wrong pointer
was being passed to input_free_device(). Correct it.
svc->input gets initialized only on successful return of this fn,
so it is absolutely wrong to pass svc->input to input_free_device().
Testing Done: Tested on EVT2.0 platform.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
return input_dev;
err_free_input:
- input_free_device(svc->input);
+ input_free_device(input_dev);
return ERR_PTR(-ENOMEM);
}