Re: [PATCH] drm/sun4i: Fix error handling

2016-11-08 Thread Maxime Ripard
Salut, On Sat, Nov 05, 2016 at 07:15:45AM +0100, Christophe JAILLET wrote: > Le 02/11/2016 à 19:14, Maxime Ripard a écrit : > > Hi, > > > > On Sun, Oct 30, 2016 at 12:53:02PM +0100, Christophe JAILLET wrote: > > > BTW, memory allocation in 'sun4i_layers_init()' looks spurious, especially > > > th

Re: [PATCH] drm/sun4i: Fix error handling

2016-11-04 Thread Christophe JAILLET
Le 02/11/2016 à 19:14, Maxime Ripard a écrit : Hi, On Sun, Oct 30, 2016 at 12:53:02PM +0100, Christophe JAILLET wrote: BTW, memory allocation in 'sun4i_layers_init()' looks spurious, especially the use of 'layer' in the for loop. Just my 2 cents. What do you mean by it's spurious? Hi Maxime,

Re: [PATCH] drm/sun4i: Fix error handling

2016-11-02 Thread Maxime Ripard
Hi, On Sun, Oct 30, 2016 at 12:53:02PM +0100, Christophe JAILLET wrote: > BTW, memory allocation in 'sun4i_layers_init()' looks spurious, especially > the use of 'layer' in the for loop. > Just my 2 cents. What do you mean by it's spurious? > I also forgot to say that we could propagate the erro

Re: [PATCH] drm/sun4i: Fix error handling

2016-11-02 Thread Maxime Ripard
On Sun, Oct 30, 2016 at 09:49:26AM +0100, Christophe JAILLET wrote: > 'sun4i_layers_init()' returns an error pointer in case of error, not > NULL. So test it with IS_ERR. > > Signed-off-by: Christophe JAILLET Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel en

Re: [PATCH] drm/sun4i: Fix error handling

2016-10-30 Thread Christophe JAILLET
Hi, BTW, memory allocation in 'sun4i_layers_init()' looks spurious, especially the use of 'layer' in the for loop. Just my 2 cents. I also forgot to say that we could propagate the error code returned by sun4i_layers_init instead of returning -EINVAL unconditionally CJ Le 30/10/2016 à

[PATCH] drm/sun4i: Fix error handling

2016-10-30 Thread Christophe JAILLET
'sun4i_layers_init()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4