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]
Date:   Wed, 12 Jul 2017 10:12:45 -0700
From:   Steve Longerbeam <slongerbeam@...il.com>
To:     Philipp Zabel <p.zabel@...gutronix.de>,
        Arnd Bergmann <arnd@...db.de>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Marek Vasut <marex@...x.de>,
        Russell King <rmk+kernel@...linux.org.uk>,
        linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] [media] staging/imx: remove confusing IS_ERR_OR_NULL
 usage



On 07/12/2017 08:50 AM, Philipp Zabel wrote:
> On Tue, 2017-07-11 at 15:18 +0200, Arnd Bergmann wrote:
>> While looking at a compiler warning, I noticed the use of
>> IS_ERR_OR_NULL, which is generally a sign of a bad API design
>> and should be avoided.
>>
>> In this driver, this is fairly easy, we can simply stop storing
>> error pointers in persistent structures, and change the two
>> functions that might return either a NULL pointer or an error
>> code to consistently return error pointers when failing.
>>
>> of_parse_subdev() now separates the error code and the pointer
>> it looks up, to clarify the interface. There are two cases
>> where this function originally returns 'NULL', and I have
>> changed that to '0' for success to keep the current behavior,
>> though returning an error would also make sense there.
>>
>> Fixes: e130291212df ("[media] media: Add i.MX media core driver")
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> ---
>> v2: fix type mismatch
>> v3: rework of_parse_subdev() as well.
> 
> Thanks!
> 
> Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>
> Tested-by: Philipp Zabel <p.zabel@...gutronix.de>
> 

Looks fine to me. Tested on SabreAuto with affected pipelines.

Reviewed-by: Steve Longerbeam <steve_longerbeam@...tor.com>
Tested-by: Steve Longerbeam <steve_longerbeam@...tor.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ