diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2018-09-26 18:29:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-26 09:56:07 -0700 |
commit | c1a935f6ec5b146aef1de03d1ef135de34f90646 (patch) | |
tree | 835004e0e6c7aeccbb453aa074dc4150efa92236 /drivers/s390/net/qeth_l3_main.c | |
parent | a70fee3b0f9007ee16bf0159018ee29684acfac0 (diff) | |
download | talos-op-linux-c1a935f6ec5b146aef1de03d1ef135de34f90646.tar.gz talos-op-linux-c1a935f6ec5b146aef1de03d1ef135de34f90646.zip |
s390/qeth: fix discipline unload after setup error
Device initialization code usually first loads a subdriver
(via qeth_core_load_discipline()), and then runs its setup() callback.
If this fails, it rolls back the load via qeth_core_free_discipline().
qeth_core_free_discipline() expects the options.layer attribute to be
initialized, but on error in setup() that's currently not the case.
Resulting in misbalanced symbol_put() calls.
Fix this by setting options.layer when loading the subdriver.
Signed-off-by: Julian Wiedmann <jwi@linux.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 | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 552bfad20f85..2756795f7708 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2489,7 +2489,6 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev) } hash_init(card->ip_htable); hash_init(card->ip_mc_htable); - card->options.layer = QETH_DISCIPLINE_LAYER3; card->info.hwtrap = 0; return 0; } |