aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcmain.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-18 07:46:58 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-18 07:46:58 -0400
commitd7cf0d57ef9e07cf0f65c58c19a8e7c4a9db72b5 (patch)
tree2715e0badd8e5fbf6b787f8ff3120c2a87551688 /drivers/s390/net/ctcmain.c
parentdc8f5d21dd6bdd94e5c5bf9bbcc616d00f0cc839 (diff)
[S390] sysfs_create_xxx return values.
Take return values of sysfs_create_group & friends into account. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/net/ctcmain.c')
-rw-r--r--drivers/s390/net/ctcmain.c21
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 = {
2686static int 2686static int
2687ctc_add_attributes(struct device *dev) 2687ctc_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);
2698out:
2699 return rc;
2692} 2700}
2693 2701
2694static void 2702static 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