summaryrefslogtreecommitdiff
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorKlaus-Dieter Wacker <kdwacker@de.ibm.com>2009-10-15 02:54:58 +0400
committerDavid S. Miller <davem@davemloft.net>2009-10-18 10:57:22 +0400
commitd816d4238245b019d6f86f58163c78f015bd94ed (patch)
tree49ca1fdc96ce1b65ed91a9d288b4efce70565128 /drivers/s390/net
parentd62e09e34eba15be382a7aed27b0fa67112e29e0 (diff)
downloadlinux-d816d4238245b019d6f86f58163c78f015bd94ed.tar.xz
lcs: Recognize return codes of ccw_device_set_online().
The creation of a new lcs device requires a call to the function ccw_device_set_online() for the read and the write channel. Failure of either call should terminate the lcs device creation immediately with return code -ENODEV. Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/lcs.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index f8dfd70a89d9..5e46415d3e13 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -2130,8 +2130,12 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
card->write.ccwdev = ccwgdev->cdev[1];
recover_state = card->state;
- ccw_device_set_online(card->read.ccwdev);
- ccw_device_set_online(card->write.ccwdev);
+ rc = ccw_device_set_online(card->read.ccwdev);
+ if (rc)
+ goto out_err;
+ rc = ccw_device_set_online(card->write.ccwdev);
+ if (rc)
+ goto out_werr;
LCS_DBF_TEXT(3, setup, "lcsnewdv");
@@ -2210,8 +2214,10 @@ netdev_out:
return 0;
out:
- ccw_device_set_offline(card->read.ccwdev);
ccw_device_set_offline(card->write.ccwdev);
+out_werr:
+ ccw_device_set_offline(card->read.ccwdev);
+out_err:
return -ENODEV;
}