Re: [patch] [media] stv090x: handle allocation failures

2011-02-14 Thread Oliver Endriss
On Monday 07 February 2011 17:56:50 Dan Carpenter wrote: > kmalloc() can fail so check whether state->internal is NULL. > append_internal() can return NULL on allocation failures so check that. > Also if we hit the error condition later in the function then there is > a memory leak and we need to c

[patch] [media] stv090x: handle allocation failures

2011-02-07 Thread Dan Carpenter
kmalloc() can fail so check whether state->internal is NULL. append_internal() can return NULL on allocation failures so check that. Also if we hit the error condition later in the function then there is a memory leak and we need to call remove_dev() to fix it. Signed-off-by: Dan Carpenter --- Co