lkml.org 
[lkml]   [2018]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] gpio: pl061: handle failed allocations
On Sat, Dec 1, 2018 at 1:03 PM Nicholas Mc Guire <hofrat@osadl.org> wrote:

> devm_kzalloc(), devm_kstrdup() and devm_kasprintf() all can
> fail internal allocation and return NULL. Using any of the assigned
> objects without checking is not safe. As this is early in the boot
> phase and these allocations really should not fail, any failure here
> is probably an indication of a more serious issue so it makes little
> sense to try and rollback the previous allocated resources or try to
> continue; but rather the probe function is simply exited with -ENOMEM.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> Fixes: 684284b64aae ("ARM: integrator: add MMCI device to IM-PD1")

Looks good to me so patch applied to my Integrator tree
for fixes.

Yours,
Liinus Walleij

\
 
 \ /
  Last update: 2018-12-07 11:15    [W:0.034 / U:0.524 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site