From: Wei Yongjun <weiyongjun1@huawei.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Kate Stewart <kstewart@linuxfoundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andrew Duggan <aduggan@synaptics.com>, Evan Green <evgreen@chromium.org> Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Date: Tue, 28 Apr 2020 13:49:48 +0000 [thread overview] Message-ID: <20200428134948.78343-1-weiyongjun1@huawei.com> (raw) In-Reply-To: <6cdcc804be73a5e3bb6e8d70ab86dc716c5cc720.camel@redhat.com> 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;
WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Kate Stewart <kstewart@linuxfoundation.org>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, Andrew Duggan <aduggan@synaptics.com>, Evan Green <evgreen@chromium.org> Cc: Wei Yongjun <weiyongjun1@huawei.com>, <linux-input@vger.kernel.org>, <kernel-janitors@vger.kernel.org> Subject: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Date: Tue, 28 Apr 2020 13:49:48 +0000 [thread overview] Message-ID: <20200428134948.78343-1-weiyongjun1@huawei.com> (raw) 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;
next prev parent reply other threads:[~2020-04-28 13:49 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-07 16:22 [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts() Lyude Paul 2018-06-07 21:15 ` Nick Desaulniers 2018-06-07 21:16 ` Nick Desaulniers 2018-06-11 17:10 ` Dmitry Torokhov 2020-04-28 13:49 ` Wei Yongjun [this message] 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 2020-04-28 23:10 ` Dmitry Torokhov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200428134948.78343-1-weiyongjun1@huawei.com \ --to=weiyongjun1@huawei.com \ --cc=aduggan@synaptics.com \ --cc=dmitry.torokhov@gmail.com \ --cc=evgreen@chromium.org \ --cc=gregkh@linuxfoundation.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=kstewart@linuxfoundation.org \ --cc=linux-input@vger.kernel.org \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.