Re: [PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-18 Thread Dmitry Torokhov
On Sat, Nov 18, 2017 at 08:21:22AM +, Russell King - ARM Linux wrote: > On Sat, Nov 18, 2017 at 02:36:53AM +0530, Arvind Yadav wrote: > > platform_get_irq() can fail here and we must check its return value. > > The test should be <= 0, and you need to return an error code for the > 0 case.

Re: [PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-18 Thread Dmitry Torokhov
On Sat, Nov 18, 2017 at 08:21:22AM +, Russell King - ARM Linux wrote: > On Sat, Nov 18, 2017 at 02:36:53AM +0530, Arvind Yadav wrote: > > platform_get_irq() can fail here and we must check its return value. > > The test should be <= 0, and you need to return an error code for the > 0 case.

Re: [PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-18 Thread Russell King - ARM Linux
On Sat, Nov 18, 2017 at 02:36:53AM +0530, Arvind Yadav wrote: > platform_get_irq() can fail here and we must check its return value. The test should be <= 0, and you need to return an error code for the 0 case. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband

Re: [PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-18 Thread Russell King - ARM Linux
On Sat, Nov 18, 2017 at 02:36:53AM +0530, Arvind Yadav wrote: > platform_get_irq() can fail here and we must check its return value. The test should be <= 0, and you need to return an error code for the 0 case. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband

[PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-17 Thread Arvind Yadav
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : return irq instead of -ENODEV. drivers/input/misc/cpcap-pwrbutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of platform_get_irq

2017-11-17 Thread Arvind Yadav
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : return irq instead of -ENODEV. drivers/input/misc/cpcap-pwrbutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/misc/cpcap-pwrbutton.c