Skip to content

Commit

Permalink
Minor code cleanup in drivers/net/r6040.c
Browse files Browse the repository at this point in the history
Replaced '0' by 'bar' in the probe function.

The 'bar' variable was already set to '0' and is already
used in pci_iomap(). This is cleaner and improves code
consistency.

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Opdenacker authored and David S. Miller committed Jul 6, 2009
1 parent 6ed1065 commit 6f5bec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,13 +1112,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
}

/* IO Size check */
if (pci_resource_len(pdev, 0) < io_size) {
if (pci_resource_len(pdev, bar) < io_size) {
printk(KERN_ERR DRV_NAME ": Insufficient PCI resources, aborting\n");
err = -EIO;
goto err_out;
}

pioaddr = pci_resource_start(pdev, 0); /* IO map base address */
pioaddr = pci_resource_start(pdev, bar); /* IO map base address */
pci_set_master(pdev);

dev = alloc_etherdev(sizeof(struct r6040_private));
Expand Down

0 comments on commit 6f5bec1

Please sign in to comment.