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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Jun 2016 12:23:46 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	chris@...a.com.au
Cc:	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] max8903: adds support for initiation via device tree.

On 06/10/2016 08:13 AM, Krzysztof Kozlowski wrote:
> On 06/10/2016 07:35 AM, Chris Lapa wrote:
>> Hi Krzysztof,
>>
>> Thanks for the review. I'm working on those changes now.
>>
>> However just so I know for the future. Why no error checking on
>> devm_kzalloc() result? Looking through the source for devm_kzalloc() it
>> looks like NULL isn't caught anywhere else.
> 
> Error checking is necessary. Just do not print the error message. The
> kernel core will print one with full back trace.
> 
> if (charger == NULL)
> 	return -ENOMEM;

... and while at it just convert it to simpler:
if (!charger)
	return -ENOMEM;

BR,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ