• Julian Wiedmann's avatar
    s390/qeth: fix discipline unload after setup error · c1a935f6
    Julian Wiedmann authored
    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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c1a935f6
qeth_l3_main.c 73.2 KB