]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: fix discipline unload after setup error
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 26 Sep 2018 16:29:04 +0000 (18:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 16:56:07 +0000 (09:56 -0700)
commited0e1923985941a190cb12c5cea035b1b10c330d
tree835004e0e6c7aeccbb453aa074dc4150efa92236
parent48fe18b8d7a1deb02fd8b25d3a73c42bc8de64e4
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>
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_core_sys.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c