Thread (3 messages) 3 messages, 3 authors, 2017-11-18

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

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2017-11-18 18:27:15
Also in: linux-arm-kernel, lkml

On Sat, Nov 18, 2017 at 08:21:22AM +0000, Russell King - ARM Linux wrote:
On Sat, Nov 18, 2017 at 02:36:53AM +0530, Arvind Yadav wrote:
quoted
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.
Instead of polluting the drivers with special handling of 0 vs negative
error we should have platform_get_irq[_byname] return -EINVAL if it sees
0.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help