aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcmain.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2006-09-19 01:56:44 -0400
committerDmitry Torokhov <dtor@insightbb.com>2006-09-19 01:56:44 -0400
commit0612ec48762bf8712db1925b2e67246d2237ebab (patch)
tree01b0d69c9c9915015c0f23ad4263646dd5413e99 /drivers/s390/net/ctcmain.c
parent4263cf0fac28122c8381b6f4f9441a43cd93c81f (diff)
parent47a5c6fa0e204a2b63309c648bb2fde36836c826 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/s390/net/ctcmain.c')
-rw-r--r--drivers/s390/net/ctcmain.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 20c8eb16f464..3257c22dd79c 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -1714,6 +1714,9 @@ add_channel(struct ccw_device *cdev, enum channel_types type)
1714 kfree(ch); 1714 kfree(ch);
1715 return 0; 1715 return 0;
1716 } 1716 }
1717
1718 spin_lock_init(&ch->collect_lock);
1719
1717 fsm_settimer(ch->fsm, &ch->timer); 1720 fsm_settimer(ch->fsm, &ch->timer);
1718 skb_queue_head_init(&ch->io_queue); 1721 skb_queue_head_init(&ch->io_queue);
1719 skb_queue_head_init(&ch->collect_queue); 1722 skb_queue_head_init(&ch->collect_queue);
@@ -2686,9 +2689,17 @@ static struct attribute_group ctc_attr_group = {
2686static int 2689static int
2687ctc_add_attributes(struct device *dev) 2690ctc_add_attributes(struct device *dev)
2688{ 2691{
2689 device_create_file(dev, &dev_attr_loglevel); 2692 int rc;
2690 device_create_file(dev, &dev_attr_stats); 2693
2691 return 0; 2694 rc = device_create_file(dev, &dev_attr_loglevel);
2695 if (rc)
2696 goto out;
2697 rc = device_create_file(dev, &dev_attr_stats);
2698 if (!rc)
2699 goto out;
2700 device_remove_file(dev, &dev_attr_loglevel);
2701out:
2702 return rc;
2692} 2703}
2693 2704
2694static void 2705static void
@@ -2901,7 +2912,12 @@ ctc_new_device(struct ccwgroup_device *cgdev)
2901 goto out; 2912 goto out;
2902 } 2913 }
2903 2914
2904 ctc_add_attributes(&cgdev->dev); 2915 if (ctc_add_attributes(&cgdev->dev)) {
2916 ctc_netdev_unregister(dev);
2917 dev->priv = NULL;
2918 ctc_free_netdevice(dev, 1);
2919 goto out;
2920 }
2905 2921
2906 strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name)); 2922 strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name));
2907 2923