diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2017-05-10 19:07:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-11 12:37:48 -0400 |
commit | 9111e7880ccf419548c7b0887df020b08eadb075 (patch) | |
tree | 4d9bd062b87b2357c24b2f3b88c46d2356b11390 /drivers/s390/net/qeth_l3_main.c | |
parent | b60161668199ac62011c024adc9e66713b9554e7 (diff) | |
download | blackbird-op-linux-9111e7880ccf419548c7b0887df020b08eadb075.tar.gz blackbird-op-linux-9111e7880ccf419548c7b0887df020b08eadb075.zip |
s390/qeth: handle sysfs error during initialization
When setting up the device from within the layer discipline's
probe routine, creating the layer-specific sysfs attributes can fail.
Report this error back to the caller, and handle it by
releasing the layer discipline.
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
[jwi: updated commit msg, moved an OSN change to a subsequent patch]
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 6e0354ef4b86..ae70daf33bd5 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -3039,8 +3039,11 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) static int qeth_l3_probe_device(struct ccwgroup_device *gdev) { struct qeth_card *card = dev_get_drvdata(&gdev->dev); + int rc; - qeth_l3_create_device_attributes(&gdev->dev); + rc = qeth_l3_create_device_attributes(&gdev->dev); + if (rc) + return rc; card->options.layer2 = 0; card->info.hwtrap = 0; return 0; |