mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-06 02:16:46 +07:00
[S390] qdio: fix init sequence
Reorder the initialization sequence of the qdio module to avoid writing to an uninitialized debug feature entry. Also reorder the exit function to restore a consistent cleanup path. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
034e9e966c
commit
aa5c8df398
@ -1649,26 +1649,26 @@ static int __init init_QDIO(void)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = qdio_setup_init();
|
rc = qdio_debug_init();
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
rc = qdio_setup_init();
|
||||||
|
if (rc)
|
||||||
|
goto out_debug;
|
||||||
rc = tiqdio_allocate_memory();
|
rc = tiqdio_allocate_memory();
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_cache;
|
goto out_cache;
|
||||||
rc = qdio_debug_init();
|
|
||||||
if (rc)
|
|
||||||
goto out_ti;
|
|
||||||
rc = tiqdio_register_thinints();
|
rc = tiqdio_register_thinints();
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_debug;
|
goto out_ti;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_debug:
|
|
||||||
qdio_debug_exit();
|
|
||||||
out_ti:
|
out_ti:
|
||||||
tiqdio_free_memory();
|
tiqdio_free_memory();
|
||||||
out_cache:
|
out_cache:
|
||||||
qdio_setup_exit();
|
qdio_setup_exit();
|
||||||
|
out_debug:
|
||||||
|
qdio_debug_exit();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void)
|
|||||||
{
|
{
|
||||||
tiqdio_unregister_thinints();
|
tiqdio_unregister_thinints();
|
||||||
tiqdio_free_memory();
|
tiqdio_free_memory();
|
||||||
qdio_debug_exit();
|
|
||||||
qdio_setup_exit();
|
qdio_setup_exit();
|
||||||
|
qdio_debug_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(init_QDIO);
|
module_init(init_QDIO);
|
||||||
|
Loading…
Reference in New Issue
Block a user