cfg_ret = pci_read_config_word(dev, off, &word); 
cfg_ret = pci_user_read_config_word(dev, off, &word); 
sys_pciconfig_read(unsigned long bus, unsigned long dfn,		   unsigned long off, unsigned long len,		   void __user *buf){	struct pci_dev *dev;	u8 byte;	u16 word;	u32 dword;	long err, cfg_ret;	err = -EPERM;	if (!capable(CAP_SYS_ADMIN))		goto error;	err = -ENODEV;	dev = pci_find_slot(bus, dfn);	if (!dev)		goto error;	lock_kernel();	switch (len) {	case 1:		cfg_ret = pci_read_config_byte(dev, off, &byte);		break;	case 2:		cfg_ret = pci_read_config_word(dev, off, &word);		break;	case 4:		cfg_ret = pci_read_config_dword(dev, off, &dword);		break;	default:		err = -EINVAL;		unlock_kernel();		goto error;	};	unlock_kernel();	err = -EIO;	if (cfg_ret != PCIBIOS_SUCCESSFUL)		goto error;	switch (len) {	case 1:		err = put_user(byte, (unsigned char __user *)buf);		break;	case 2:		err = put_user(word, (unsigned short __user *)buf);		break;	case 4:		err = put_user(dword, (unsigned int __user *)buf);		break;	};	return err;error:	/* ??? XFree86 doesn't even check the return value.  They	   just look for 0xffffffff in the output, since that's what	   they get instead of a machine check on x86.  */	switch (len) {	case 1:		put_user(-1, (unsigned char __user *)buf);		break;	case 2:		put_user(-1, (unsigned short __user *)buf);		break;	case 4:		put_user(-1, (unsigned int __user *)buf);		break;	};	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e04b0ea2e0f9c1bb0d874db4493fc7f7a623116b/syscall.c/buggy/drivers/pci/syscall.c