tmpbuf = pnpbios_kmalloc(escd.escd_size, GFP_KERNEL); 
tmpbuf = kcalloc(1, escd.escd_size, GFP_KERNEL); 
static int proc_read_escd(char *buf, char **start, off_t pos,                          int count, int *eof, void *data){	struct escd_info_struc escd;	char *tmpbuf;	int escd_size, escd_left_to_read, n;	if (pnp_bios_escd_info(&escd))		return -EIO;	/* sanity check */	if (escd.escd_size > MAX_SANE_ESCD_SIZE) {		printk(KERN_ERR "PnPBIOS: proc_read_escd: ESCD size reported by BIOS escd_info call is too great\n");		return -EFBIG;	}	tmpbuf = pnpbios_kmalloc(escd.escd_size, GFP_KERNEL);	if (!tmpbuf) return -ENOMEM;	if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) {		kfree(tmpbuf);		return -EIO;	}	escd_size = (unsigned char)(tmpbuf[0]) + (unsigned char)(tmpbuf[1])*256;	/* sanity check */	if (escd_size > MAX_SANE_ESCD_SIZE) {		printk(KERN_ERR "PnPBIOS: proc_read_escd: ESCD size reported by BIOS read_escd call is too great\n");		return -EFBIG;	}	escd_left_to_read = escd_size - pos;	if (escd_left_to_read < 0) escd_left_to_read = 0;	if (escd_left_to_read == 0) *eof = 1;	n = min(count,escd_left_to_read);	memcpy(buf, tmpbuf + pos, n);	kfree(tmpbuf);	*start = buf;	return n;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a2822e7f00cdccbff8e507b5ebbddce1aa95eb5d/proc.c/clean/drivers/pnp/pnpbios/proc.c