diff options
Diffstat (limited to 'drivers/tty/synclink.c')
-rw-r--r-- | drivers/tty/synclink.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index b7991707ffc0..2fac7123b274 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c | |||
@@ -4410,7 +4410,8 @@ static void synclink_cleanup(void) | |||
4410 | printk("Unloading %s: %s\n", driver_name, driver_version); | 4410 | printk("Unloading %s: %s\n", driver_name, driver_version); |
4411 | 4411 | ||
4412 | if (serial_driver) { | 4412 | if (serial_driver) { |
4413 | if ((rc = tty_unregister_driver(serial_driver))) | 4413 | rc = tty_unregister_driver(serial_driver); |
4414 | if (rc) | ||
4414 | printk("%s(%d) failed to unregister tty driver err=%d\n", | 4415 | printk("%s(%d) failed to unregister tty driver err=%d\n", |
4415 | __FILE__,__LINE__,rc); | 4416 | __FILE__,__LINE__,rc); |
4416 | put_tty_driver(serial_driver); | 4417 | put_tty_driver(serial_driver); |
@@ -7751,7 +7752,8 @@ static int hdlcdev_open(struct net_device *dev) | |||
7751 | printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); | 7752 | printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); |
7752 | 7753 | ||
7753 | /* generic HDLC layer open processing */ | 7754 | /* generic HDLC layer open processing */ |
7754 | if ((rc = hdlc_open(dev))) | 7755 | rc = hdlc_open(dev); |
7756 | if (rc) | ||
7755 | return rc; | 7757 | return rc; |
7756 | 7758 | ||
7757 | /* arbitrate between network and tty opens */ | 7759 | /* arbitrate between network and tty opens */ |
@@ -8018,7 +8020,8 @@ static int hdlcdev_init(struct mgsl_struct *info) | |||
8018 | 8020 | ||
8019 | /* allocate and initialize network and HDLC layer objects */ | 8021 | /* allocate and initialize network and HDLC layer objects */ |
8020 | 8022 | ||
8021 | if (!(dev = alloc_hdlcdev(info))) { | 8023 | dev = alloc_hdlcdev(info); |
8024 | if (!dev) { | ||
8022 | printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); | 8025 | printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); |
8023 | return -ENOMEM; | 8026 | return -ENOMEM; |
8024 | } | 8027 | } |
@@ -8039,7 +8042,8 @@ static int hdlcdev_init(struct mgsl_struct *info) | |||
8039 | hdlc->xmit = hdlcdev_xmit; | 8042 | hdlc->xmit = hdlcdev_xmit; |
8040 | 8043 | ||
8041 | /* register objects with HDLC layer */ | 8044 | /* register objects with HDLC layer */ |
8042 | if ((rc = register_hdlc_device(dev))) { | 8045 | rc = register_hdlc_device(dev); |
8046 | if (rc) { | ||
8043 | printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); | 8047 | printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); |
8044 | free_netdev(dev); | 8048 | free_netdev(dev); |
8045 | return rc; | 8049 | return rc; |
@@ -8075,7 +8079,8 @@ static int synclink_init_one (struct pci_dev *dev, | |||
8075 | return -EIO; | 8079 | return -EIO; |
8076 | } | 8080 | } |
8077 | 8081 | ||
8078 | if (!(info = mgsl_allocate_device())) { | 8082 | info = mgsl_allocate_device(); |
8083 | if (!info) { | ||
8079 | printk("can't allocate device instance data.\n"); | 8084 | printk("can't allocate device instance data.\n"); |
8080 | return -EIO; | 8085 | return -EIO; |
8081 | } | 8086 | } |