Re: [PATCH 2/2] [media] vb2: Fix error handling in '__vb2_buf_mem_alloc'

2017-04-24 Thread Sakari Ailus
Hi Christophe, On Mon, Apr 24, 2017 at 10:25:18PM +0200, Christophe JAILLET wrote: > Le 24/04/2017 à 16:23, Sakari Ailus a écrit : > >Hi Christophe, > > > >On Sun, Apr 23, 2017 at 11:40:30PM +0200, Christophe JAILLET wrote: > >>'call_ptr_memop' can return NULL, so we must test its return value wit

Re: [PATCH 2/2] [media] vb2: Fix error handling in '__vb2_buf_mem_alloc'

2017-04-24 Thread Christophe JAILLET
Le 24/04/2017 à 16:23, Sakari Ailus a écrit : Hi Christophe, On Sun, Apr 23, 2017 at 11:40:30PM +0200, Christophe JAILLET wrote: 'call_ptr_memop' can return NULL, so we must test its return value with 'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless. Signed-off-by: Christop

Re: [PATCH 2/2] [media] vb2: Fix error handling in '__vb2_buf_mem_alloc'

2017-04-24 Thread Sakari Ailus
Hi Christophe, On Sun, Apr 23, 2017 at 11:40:30PM +0200, Christophe JAILLET wrote: > 'call_ptr_memop' can return NULL, so we must test its return value with > 'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless. > > Signed-off-by: Christophe JAILLET > --- > Note that error check

[PATCH 2/2] [media] vb2: Fix error handling in '__vb2_buf_mem_alloc'

2017-04-23 Thread Christophe JAILLET
'call_ptr_memop' can return NULL, so we must test its return value with 'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless. Signed-off-by: Christophe JAILLET --- Note that error checking after 'call_ptr_memop' calls is not consistent in this file. I guess that 'IS_ERR_OR_NULL' s