diff options
author | Vaibhav Hiremath <hiremath_vaibhav@projectara.com> | 2016-06-15 10:23:23 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-15 23:57:20 -0700 |
commit | 880bc0a4afa66e36f62e5687bef464a751781d55 (patch) | |
tree | 9313db967ffe9bed75ad34f6ced95bf1b55989fe /drivers/staging/greybus/svc.c | |
parent | 9120b9060bca4528d13de5c4e6522e6a78110704 (diff) |
greybus: svc: Pass the correct pointer to input_free_device()
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>
Diffstat (limited to 'drivers/staging/greybus/svc.c')
-rw-r--r-- | drivers/staging/greybus/svc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index e316f08ab756..48d07a91f01f 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -1352,7 +1352,7 @@ static struct input_dev *gb_svc_input_create(struct gb_svc *svc) return input_dev; err_free_input: - input_free_device(svc->input); + input_free_device(input_dev); return ERR_PTR(-ENOMEM); } |