* [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
@ 2018-06-07 1:48 Wei Yongjun
0 siblings, 0 replies; 7+ messages in thread
From: Wei Yongjun @ 2018-06-07 1:48 UTC (permalink / raw)
To: kernel-janitors
The error return code PTR_ERR(data->irqdomain) is always 0 since
data->irqdomain is equal to NULL in this error handling case.
Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/input/rmi4/rmi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 2fb0ae0..cb6d983 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
data);
if (!data->irqdomain) {
dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
- return PTR_ERR(data->irqdomain);
+ return -ENOMEM;
}
data->irq_count = irq_count;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
@ 2018-06-07 16:22 Lyude Paul
2018-06-07 21:15 ` Nick Desaulniers
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Lyude Paul @ 2018-06-07 16:22 UTC (permalink / raw)
To: kernel-janitors
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Thu, 2018-06-07 at 01:48 +0000, Wei Yongjun wrote:
> The error return code PTR_ERR(data->irqdomain) is always 0 since
> data->irqdomain is equal to NULL in this error handling case.
>
> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
> irq_domain")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/input/rmi4/rmi_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/rmi4/rmi_driver.c
> b/drivers/input/rmi4/rmi_driver.c
> index 2fb0ae0..cb6d983 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
> data);
> if (!data->irqdomain) {
> dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
> - return PTR_ERR(data->irqdomain);
> + return -ENOMEM;
> }
>
> data->irq_count = irq_count;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Cheers,
Lyude Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
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
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Nick Desaulniers @ 2018-06-07 21:15 UTC (permalink / raw)
To: kernel-janitors
On Thu, Jun 7, 2018 at 9:22 AM, Lyude Paul <lyude@redhat.com> wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> On Thu, 2018-06-07 at 01:48 +0000, Wei Yongjun wrote:
>> The error return code PTR_ERR(data->irqdomain) is always 0 since
>> data->irqdomain is equal to NULL in this error handling case.
>>
>> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
>> irq_domain")
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> ---
>> drivers/input/rmi4/rmi_driver.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/rmi4/rmi_driver.c
>> b/drivers/input/rmi4/rmi_driver.c
>> index 2fb0ae0..cb6d983 100644
>> --- a/drivers/input/rmi4/rmi_driver.c
>> +++ b/drivers/input/rmi4/rmi_driver.c
>> @@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
>> data);
>> if (!data->irqdomain) {
>> dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
>> - return PTR_ERR(data->irqdomain);
>> + return -ENOMEM;
>> }
>>
>> data->irq_count = irq_count;
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> Cheers,
> Lyude Paul
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
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 ` [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Wei Yongjun
3 siblings, 0 replies; 7+ messages in thread
From: Nick Desaulniers @ 2018-06-07 21:16 UTC (permalink / raw)
To: kernel-janitors
On Thu, Jun 7, 2018 at 2:15 PM, Nick Desaulniers
<nick.desaulniers@gmail.com> wrote:
> On Thu, Jun 7, 2018 at 9:22 AM, Lyude Paul <lyude@redhat.com> wrote:
>> Reviewed-by: Lyude Paul <lyude@redhat.com>
>>
>> On Thu, 2018-06-07 at 01:48 +0000, Wei Yongjun wrote:
>>> The error return code PTR_ERR(data->irqdomain) is always 0 since
>>> data->irqdomain is equal to NULL in this error handling case.
>>>
>>> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
>>> irq_domain")
>>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>>> ---
>>> drivers/input/rmi4/rmi_driver.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/input/rmi4/rmi_driver.c
>>> b/drivers/input/rmi4/rmi_driver.c
>>> index 2fb0ae0..cb6d983 100644
>>> --- a/drivers/input/rmi4/rmi_driver.c
>>> +++ b/drivers/input/rmi4/rmi_driver.c
>>> @@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
>>> data);
>>> if (!data->irqdomain) {
>>> dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
>>> - return PTR_ERR(data->irqdomain);
>>> + return -ENOMEM;
>>> }
>>>
>>> data->irq_count = irq_count;
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> --
>> Cheers,
>> Lyude Paul
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Sorry, that probably should have been a
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
hopefully that doesn't mess up any maintainers' automated scripts.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
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 ` [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Wei Yongjun
3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2018-06-11 17:10 UTC (permalink / raw)
To: kernel-janitors
On Thu, Jun 07, 2018 at 02:16:43PM -0700, Nick Desaulniers wrote:
> On Thu, Jun 7, 2018 at 2:15 PM, Nick Desaulniers
> <nick.desaulniers@gmail.com> wrote:
> > On Thu, Jun 7, 2018 at 9:22 AM, Lyude Paul <lyude@redhat.com> wrote:
> >> Reviewed-by: Lyude Paul <lyude@redhat.com>
> >>
> >> On Thu, 2018-06-07 at 01:48 +0000, Wei Yongjun wrote:
> >>> The error return code PTR_ERR(data->irqdomain) is always 0 since
> >>> data->irqdomain is equal to NULL in this error handling case.
> >>>
> >>> Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to
> >>> irq_domain")
> >>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> >>> ---
> >>> drivers/input/rmi4/rmi_driver.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/input/rmi4/rmi_driver.c
> >>> b/drivers/input/rmi4/rmi_driver.c
> >>> index 2fb0ae0..cb6d983 100644
> >>> --- a/drivers/input/rmi4/rmi_driver.c
> >>> +++ b/drivers/input/rmi4/rmi_driver.c
> >>> @@ -1043,7 +1043,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
> >>> data);
> >>> if (!data->irqdomain) {
> >>> dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n");
> >>> - return PTR_ERR(data->irqdomain);
> >>> + return -ENOMEM;
> >>> }
> >>>
> >>> data->irq_count = irq_count;
> >>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >> --
> >> Cheers,
> >> Lyude Paul
> >
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>
> Sorry, that probably should have been a
>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> hopefully that doesn't mess up any maintainers' automated scripts.
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
2018-06-07 16:22 [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts() Lyude Paul
` (2 preceding siblings ...)
2018-06-11 17:10 ` Dmitry Torokhov
@ 2020-04-28 13:49 ` Wei Yongjun
2020-04-28 23:10 ` Dmitry Torokhov
3 siblings, 1 reply; 7+ 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] 7+ messages in thread
* Re: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()
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
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2020-04-28 23:10 UTC (permalink / raw)
To: Wei Yongjun
Cc: Thomas Gleixner, Kate Stewart, Greg Kroah-Hartman, Andrew Duggan,
Evan Green, linux-input, kernel-janitors
On Tue, Apr 28, 2020 at 01:49:48PM +0000, Wei Yongjun wrote:
> 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>
Applied, thank you.
> ---
> 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;
>
>
>
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-28 23:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Wei Yongjun
2020-04-28 23:10 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2018-06-07 1:48 [PATCH -next] Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts() Wei Yongjun
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).