Skip to content

Commit

Permalink
[S390] qdio: fix init sequence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Apr 4, 2011
1 parent 034e9e9 commit aa5c8df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,35 +1649,35 @@ static int __init init_QDIO(void)
{
int rc;

rc = qdio_setup_init();
rc = qdio_debug_init();
if (rc)
return rc;
rc = qdio_setup_init();
if (rc)
goto out_debug;
rc = tiqdio_allocate_memory();
if (rc)
goto out_cache;
rc = qdio_debug_init();
if (rc)
goto out_ti;
rc = tiqdio_register_thinints();
if (rc)
goto out_debug;
goto out_ti;
return 0;

out_debug:
qdio_debug_exit();
out_ti:
tiqdio_free_memory();
out_cache:
qdio_setup_exit();
out_debug:
qdio_debug_exit();
return rc;
}

static void __exit exit_QDIO(void)
{
tiqdio_unregister_thinints();
tiqdio_free_memory();
qdio_debug_exit();
qdio_setup_exit();
qdio_debug_exit();
}

module_init(init_QDIO);
Expand Down

0 comments on commit aa5c8df

Please sign in to comment.