can: some fixes and cleanups to the initial device driver interface
authorWolfgang Grandegger <wg@grandegger.com>
Sat, 30 May 2009 07:55:48 +0000 (07:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2009 09:53:33 +0000 (02:53 -0700)
This patch fixes a few errors sneaked into the initial version of the
device driver interface.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/dev.c
drivers/net/can/sja1000/ems_pci.c
drivers/net/can/sja1000/sja1000.c

index 52b0e7d8901d8b37282efbbe8e66ef9f3676259f..574daddc21bfb02817fb3b49cfe5dec624936f8e 100644 (file)
@@ -477,7 +477,7 @@ int open_candev(struct net_device *dev)
 
        return 0;
 }
-EXPORT_SYMBOL(open_candev);
+EXPORT_SYMBOL_GPL(open_candev);
 
 /*
  * Common close function for cleanup before the device gets closed.
index 3cd2ff9165e35e8d0d56332b8a0fd0c3b25c82c8..88a4649c2ceddf1072028c03b62f421def7605a2 100644 (file)
@@ -218,14 +218,12 @@ static int __devinit ems_pci_add_card(struct pci_dev *pdev,
        card->conf_addr = pci_iomap(pdev, 0, EMS_PCI_MEM_SIZE);
        if (card->conf_addr == NULL) {
                err = -ENOMEM;
-
                goto failure_cleanup;
        }
 
        card->base_addr = pci_iomap(pdev, 1, EMS_PCI_MEM_SIZE);
        if (card->base_addr == NULL) {
                err = -ENOMEM;
-
                goto failure_cleanup;
        }
 
@@ -239,7 +237,6 @@ static int __devinit ems_pci_add_card(struct pci_dev *pdev,
            ems_pci_readb(card, 3) != 0xCB ||
            ems_pci_readb(card, 4) != 0x11) {
                dev_err(&pdev->dev, "Not EMS Dr. Thomas Wuensche interface\n");
-
                err = -ENODEV;
                goto failure_cleanup;
        }
index 05b38dde648e8a29790098943851c83a6478d2eb..b689964f182c8cbfd994fd02cba6ecf0a590c34c 100644 (file)
@@ -532,8 +532,8 @@ static int sja1000_open(struct net_device *dev)
                err = request_irq(dev->irq, &sja1000_interrupt, priv->irq_flags,
                                  dev->name, (void *)dev);
                if (err) {
-                       return -EAGAIN;
                        close_candev(dev);
+                       return -EAGAIN;
                }
        }