summaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core_main.c
diff options
context:
space:
mode:
authorUrsula Braun2017-05-10 19:07:51 +0200
committerDavid S. Miller2017-05-11 18:37:48 +0200
commit9111e7880ccf419548c7b0887df020b08eadb075 (patch)
tree4d9bd062b87b2357c24b2f3b88c46d2356b11390 /drivers/s390/net/qeth_core_main.c
parentmdio: mux: Correct mdio_mux_init error path issues (diff)
downloadkernel-qcow2-linux-9111e7880ccf419548c7b0887df020b08eadb075.tar.gz
kernel-qcow2-linux-9111e7880ccf419548c7b0887df020b08eadb075.tar.xz
kernel-qcow2-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_core_main.c')
-rw-r--r--drivers/s390/net/qeth_core_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 38114a8d56e0..5bfd7c15d6a9 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -5731,8 +5731,10 @@ static int qeth_core_set_online(struct ccwgroup_device *gdev)
if (rc)
goto err;
rc = card->discipline->setup(card->gdev);
- if (rc)
+ if (rc) {
+ qeth_core_free_discipline(card);
goto err;
+ }
}
rc = card->discipline->set_online(gdev);
err: