aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
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
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')
-rw-r--r--drivers/s390/net/ctcmain.c21
-rw-r--r--drivers/s390/net/qeth_main.c7
2 files changed, 21 insertions, 7 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
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 103c41470bd2..5fff1f93973a 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -8451,10 +8451,11 @@ __qeth_reboot_event_card(struct device *dev, void *data)
8451static int 8451static int
8452qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) 8452qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
8453{ 8453{
8454 int ret;
8454 8455
8455 driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL, 8456 ret = driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
8456 __qeth_reboot_event_card); 8457 __qeth_reboot_event_card);
8457 return NOTIFY_DONE; 8458 return ret ? NOTIFY_BAD : NOTIFY_DONE;
8458} 8459}
8459 8460
8460 8461