diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-31 08:59:59 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-31 08:59:59 -0400 |
commit | b1b934d31d8a608fe69fc56d6e539548b55b0601 (patch) | |
tree | e8206589759c732a3a9b70b3feeb9ef50dc3c6b3 /drivers/s390/net/ctcmain.c | |
parent | 5dd9feafb351a8bf304292623cbc63335c34d279 (diff) | |
parent | b6ff50833ad43a8ebd9b16bf53c334f7aaf33c41 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/s390/net/ctcmain.c')
-rw-r--r-- | drivers/s390/net/ctcmain.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 20c8eb16f464..8a4b58120146 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -2686,9 +2686,17 @@ static struct attribute_group ctc_attr_group = { | |||
2686 | static int | 2686 | static int |
2687 | ctc_add_attributes(struct device *dev) | 2687 | ctc_add_attributes(struct device *dev) |
2688 | { | 2688 | { |
2689 | device_create_file(dev, &dev_attr_loglevel); | 2689 | int rc; |
2690 | device_create_file(dev, &dev_attr_stats); | 2690 | |
2691 | return 0; | 2691 | rc = device_create_file(dev, &dev_attr_loglevel); |
2692 | if (rc) | ||
2693 | goto out; | ||
2694 | rc = device_create_file(dev, &dev_attr_stats); | ||
2695 | if (!rc) | ||
2696 | goto out; | ||
2697 | device_remove_file(dev, &dev_attr_loglevel); | ||
2698 | out: | ||
2699 | return rc; | ||
2692 | } | 2700 | } |
2693 | 2701 | ||
2694 | static void | 2702 | static void |
@@ -2901,7 +2909,12 @@ ctc_new_device(struct ccwgroup_device *cgdev) | |||
2901 | goto out; | 2909 | goto out; |
2902 | } | 2910 | } |
2903 | 2911 | ||
2904 | ctc_add_attributes(&cgdev->dev); | 2912 | if (ctc_add_attributes(&cgdev->dev)) { |
2913 | ctc_netdev_unregister(dev); | ||
2914 | dev->priv = NULL; | ||
2915 | ctc_free_netdevice(dev, 1); | ||
2916 | goto out; | ||
2917 | } | ||
2905 | 2918 | ||
2906 | strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name)); | 2919 | strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name)); |
2907 | 2920 | ||