lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171118182704.2jtdu562iokx6zo2@dtor-ws>
Date:   Sat, 18 Nov 2017 10:27:04 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Russell King - ARM Linux <linux@...linux.org.uk>
Cc:     Arvind Yadav <arvind.yadav.cs@...il.com>,
        maxime.ripard@...e-electrons.com, wens@...e.org,
        linux@...ck-us.net, wsa@...-dreams.de, daniel.thompson@...aro.org,
        mcuos.com@...il.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-input@...r.kernel.org
Subject: Re: [PATCH 5/10 v2] Input: cpcap-pwrbutton: Handle return value of
 platform_get_irq

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:
> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ