/* Walk the resources in @dev creating files for each resource available.  */
int pci_create_resource_files(struct pci_dev *pdev)
/* Walk the resources in @dev creating files for each resource available.  */
int pci_create_resource_files(struct pci_dev *pdev)
{
	int i;
	int retval;
	for (i = 0; i < PCI_ROM_RESOURCE; i++) {
		if (!pci_resource_len(pdev, i))
			continue;
		retval = pci_create_attr(pdev, i);
		if (retval) {
			pci_remove_resource_files(pdev);
			return retval;
		}
	}
	return 0;
}