pci_dev_get(chip->pci_dev); 
get_device(chip->dev); 
int tpm_open(struct inode *inode, struct file *file){	int rc = 0, minor = iminor(inode);	struct tpm_chip *chip = NULL, *pos;	spin_lock(&driver_lock);	list_for_each_entry(pos, &tpm_chip_list, list) {		if (pos->vendor->miscdev.minor == minor) {			chip = pos;			break;		}	}	if (chip == NULL) {		rc = -ENODEV;		goto err_out;	}	if (chip->num_opens) {		dev_dbg(&chip->pci_dev->dev,			"Another process owns this TPM\n");		rc = -EBUSY;		goto err_out;	}	chip->num_opens++;	pci_dev_get(chip->pci_dev);	spin_unlock(&driver_lock);	chip->data_buffer = kmalloc(TPM_BUFSIZE * sizeof(u8), GFP_KERNEL);	if (chip->data_buffer == NULL) {		chip->num_opens--;		pci_dev_put(chip->pci_dev);		return -ENOMEM;	}	atomic_set(&chip->data_pending, 0);	file->private_data = chip;	return 0;err_out:	spin_unlock(&driver_lock);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e659a3fe2027b19ecd8abb7ad79253672763454b/tpm.c/buggy/drivers/char/tpm/tpm.c