lkml.org 
[lkml]   [2016]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] max8903: adds support for initiation via device tree.
From
Date
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;


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2016-06-10 09:01    [W:0.114 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site