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

2017-05-12 Thread Linus Walleij
On Sat, May 6, 2017 at 10:23 AM, Christophe JAILLET 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: Christo

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

2017-05-09 Thread Stafford Horne
On Tue, May 09, 2017 at 10:27:20AM +0300, Dan Carpenter wrote: > On Sun, May 07, 2017 at 04:40:38AM +0900, Stafford Horne wrote: > > Hi Christophe, > > > > On Sat, May 06, 2017 at 10:23:59AM +0200, Christophe JAILLET wrote: > > > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > > >

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

2017-05-09 Thread Dan Carpenter
On Sun, May 07, 2017 at 04:40:38AM +0900, Stafford Horne wrote: > Hi Christophe, > > On Sat, May 06, 2017 at 10:23:59AM +0200, Christophe JAILLET wrote: > > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > > Return -ENOMEM instead, as done for the other memory allocation just a > >

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

2017-05-06 Thread Stafford Horne
Hi Christophe, On Sat, May 06, 2017 at 10:23:59AM +0200, Christophe JAILLET 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. This looks fine. > BTW, change the 'devm_kzalloc' into a

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

2017-05-06 Thread Christophe JAILLET
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 --- drivers/pinctrl/freescale/pinctrl-imx.c | 5 +++-- 1 f