diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-07-18 07:46:58 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-07-18 07:46:58 -0400 |
commit | d7cf0d57ef9e07cf0f65c58c19a8e7c4a9db72b5 (patch) | |
tree | 2715e0badd8e5fbf6b787f8ff3120c2a87551688 /drivers/s390/net | |
parent | dc8f5d21dd6bdd94e5c5bf9bbcc616d00f0cc839 (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.c | 21 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 7 |
2 files changed, 21 insertions, 7 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 20c8eb16f46..8a4b5812014 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 | ||
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 103c41470bd..5fff1f93973 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) | |||
8451 | static int | 8451 | static int |
8452 | qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) | 8452 | qeth_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 | ||