From: Klaus-Dieter Wacker 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 Signed-off-by: Ursula Braun --- drivers/s390/net/lcs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff -urpN linux-2.6/drivers/s390/net/lcs.c linux-2.6-patched/drivers/s390/net/lcs.c --- linux-2.6/drivers/s390/net/lcs.c 2009-10-15 10:19:52.000000000 +0200 +++ linux-2.6-patched/drivers/s390/net/lcs.c 2009-10-15 10:19:52.000000000 +0200 @@ -2130,8 +2130,12 @@ lcs_new_device(struct ccwgroup_device *c 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; } -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html