[PATCH] tm6000: fix vbuf may be used uninitialized

Dan Carpenter error27 at gmail.com
Thu Mar 24 20:31:08 UTC 2011


On Thu, Mar 24, 2011 at 04:07:00PM -0400, Jarod Wilson wrote:
> Signed-off-by: Jarod Wilson <jarod at redhat.com>

Jarod, there is a lot of information missing from your change log...  :/

> CC: devel at driverdev.osuosl.org
> ---
>  drivers/staging/tm6000/tm6000-video.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
> index c80a316..bfebedd 100644
> --- a/drivers/staging/tm6000/tm6000-video.c
> +++ b/drivers/staging/tm6000/tm6000-video.c
> @@ -228,7 +228,7 @@ static int copy_streams(u8 *data, unsigned long len,
>  	unsigned long header = 0;
>  	int rc = 0;
>  	unsigned int cmd, cpysize, pktsize, size, field, block, line, pos = 0;
> -	struct tm6000_buffer *vbuf;
> +	struct tm6000_buffer *vbuf = NULL;
>  	char *voutp = NULL;
>  	unsigned int linewidth;
>  

This looks like a real bug versus just a GCC warning.  It was introduced
in 8aff8ba95155df "[media] tm6000: add radio support to the driver".
I've added Dmitri to the CC list.

regards,
dan carpenter




More information about the devel mailing list