linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
@ 2020-04-28 13:49 Wei Yongjun
  2020-04-28 23:10 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-04-28 13:49 UTC (permalink / raw)
  To: Dmitry Torokhov, Thomas Gleixner, Kate Stewart,
	Greg Kroah-Hartman, Andrew Duggan, Evan Green
  Cc: Wei Yongjun, linux-input, kernel-janitors

Fix to return a negative error code from the input_register_device()
error handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/input/rmi4/rmi_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 190b9974526b..bfc08d7b25d0 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -1210,7 +1210,8 @@ static int rmi_driver_probe(struct device *dev)
 	if (data->input) {
 		rmi_driver_set_input_name(rmi_dev, data->input);
 		if (!rmi_dev->xport->input) {
-			if (input_register_device(data->input)) {
+			retval = input_register_device(data->input);
+			if (retval) {
 				dev_err(dev, "%s: Failed to register input device.\n",
 					__func__);
 				goto err_destroy_functions;




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-28 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 13:49 [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Wei Yongjun
2020-04-28 23:10 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).