Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 880bc0a4 authored by Vaibhav Hiremath's avatar Vaibhav Hiremath Committed by Greg Kroah-Hartman
Browse files

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: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 9120b906
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1352,7 +1352,7 @@ static struct input_dev *gb_svc_input_create(struct gb_svc *svc)
	return input_dev;
	return input_dev;


err_free_input:
err_free_input:
	input_free_device(svc->input);
	input_free_device(input_dev);
	return ERR_PTR(-ENOMEM);
	return ERR_PTR(-ENOMEM);
}
}