rc = len; goto out; 
dev_err(&chip->pci_dev->dev, "A TPM error (%d) occurred " "attempting to read the PUBEK\n", be32_to_cpu(*((__be32 *) (data + 6)))); return 0; 
ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,		       char *buf){	u8 *data;	ssize_t len;	int i, rc;	char *str = buf;	struct tpm_chip *chip =	    pci_get_drvdata(to_pci_dev(dev));	if (chip == NULL)		return -ENODEV;	data = kmalloc(READ_PUBEK_RESULT_SIZE, GFP_KERNEL);	if (!data)		return -ENOMEM;	memcpy(data, readpubek, sizeof(readpubek));	memset(data + sizeof(readpubek), 0, 20);	/* zero nonce */	if ((len = tpm_transmit(chip, data, READ_PUBEK_RESULT_SIZE)) <	    READ_PUBEK_RESULT_SIZE) {		rc = len;		goto out;	}	/* 	   ignore header 10 bytes	   algorithm 32 bits (1 == RSA )	   encscheme 16 bits	   sigscheme 16 bits	   parameters (RSA 12->bytes: keybit, #primes, expbit)  	   keylenbytes 32 bits	   256 byte modulus	   ignore checksum 20 bytes	 */	str +=	    sprintf(str,		    "Algorithm: %02X %02X %02X %02X\nEncscheme: %02X %02X\n"		    "Sigscheme: %02X %02X\nParameters: %02X %02X %02X %02X"		    " %02X %02X %02X %02X %02X %02X %02X %02X\n"		    "Modulus length: %d\nModulus: \n",		    data[10], data[11], data[12], data[13], data[14],		    data[15], data[16], data[17], data[22], data[23],		    data[24], data[25], data[26], data[27], data[28],		    data[29], data[30], data[31], data[32], data[33],		    be32_to_cpu(*((__be32 *) (data + 32))));	for (i = 0; i < 256; i++) {		str += sprintf(str, "%02X ", data[i + 39]);		if ((i + 1) % 16 == 0)			str += sprintf(str, "\n");	}	rc = str - buf;out:	kfree(data);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e234bc970451edc4021637fe2979b887da873f9a/tpm.c/buggy/drivers/char/tpm/tpm.c