Re: [PATCH] media: meson: add missing allocation failure check on new_buf

2019-12-12 Thread Maxime Jourdan
On Thu, Dec 5, 2019 at 9:06 AM Sergey Senozhatsky wrote: > > On (19/12/04 14:11), Colin King wrote: > [..] > > diff --git a/drivers/staging/media/meson/vdec/vdec.c > > b/drivers/staging/media/meson/vdec/vdec.c > > index 0a1a04fd5d13..8dd1396909d7 100644 > > ---

Re: [PATCH] media: meson: add missing allocation failure check on new_buf

2019-12-05 Thread Sergey Senozhatsky
On (19/12/04 14:11), Colin King wrote: [..] > diff --git a/drivers/staging/media/meson/vdec/vdec.c > b/drivers/staging/media/meson/vdec/vdec.c > index 0a1a04fd5d13..8dd1396909d7 100644 > --- a/drivers/staging/media/meson/vdec/vdec.c > +++ b/drivers/staging/media/meson/vdec/vdec.c > @@ -133,6

Re: [PATCH] media: meson: add missing allocation failure check on new_buf

2019-12-04 Thread Kevin Hilman
Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > >

[PATCH] media: meson: add missing allocation failure check on new_buf

2019-12-04 Thread Colin King
From: Colin Ian King Currently if the allocation of new_buf fails then a null pointer dereference occurs when assiging new_buf->vb. Avoid this by returning early on a memory allocation failure as there is not much more can be done at this point. Addresses-Coverity: ("Dereference null return")