[parisc-linux-cvs] don't assume kmalloc() returns zeroed memory

Richard Hirst rhirst@linuxcare.com
Wed, 13 Jun 2001 13:56:53 +0100


This is harmless but unnecessary.  Likely real fix (to sticon.c) sent
to Helge for comment, thanks to Geert.  I'll back this out when the
real fix goes in.

Richard

On Tue, Jun 12, 2001 at 08:20:06AM +0100, Richard Hirst wrote:
> Index: drivers/char/console.c
> ===================================================================
> RCS file: /home/cvs/parisc/linux/drivers/char/console.c,v
> retrieving revision 1.11
> diff -u -r1.11 console.c
> --- console.c	2001/01/25 00:00:39	1.11
> +++ console.c	2001/06/12 13:16:24
> @@ -652,6 +652,7 @@
>  	    p = (long) kmalloc(structsize, GFP_KERNEL);
>  	    if (!p)
>  		return -ENOMEM;
> +	    memset((void *)p, 0, structsize);
>  	    vc_cons[currcons].d = (struct vc_data *)p;
>  	    vt_cons[currcons] = (struct vt_struct *)(p+sizeof(struct vc_data));
>  	    visual_init(currcons, 1);
> 
> 
> _______________________________________________
> parisc-linux-cvs mailing list
> parisc-linux-cvs@lists.parisc-linux.org
> http://lists.parisc-linux.org/cgi-bin/mailman/listinfo/parisc-linux-cvs
>