Re: [PATCH] pinctrl: imx: Check for memory allocation failure

From: Linus Walleij
Date: Fri May 12 2017 - 05:11:38 EST


On Sat, May 6, 2017 at 10:23 AM, Christophe JAILLET
<christophe.jaillet@xxxxxxxxxx> wrote:

> If 'devm_kzalloc' fails, a NULL pointer will be dereferenced.
> Return -ENOMEM instead, as done for the other memory allocation just a
> few lines below.
> BTW, change the 'devm_kzalloc' into a 'devm_kcalloc'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>

Patch applied.

Yours,
Linus Walleij