mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
Cleanup. In scst_cmd_done_pr_preempt() cmd->pr_abort_counter and, hence, saved_cmd_done must be not NULL.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2339,15 +2339,12 @@ static void scst_cmd_done_pr_preempt(struct scst_cmd *cmd, int next_state,
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
saved_cmd_done = NULL; /* to remove warning that it's used not inited */
|
||||
if (!atomic_dec_and_test(&cmd->pr_abort_counter->pr_abort_pending_cnt))
|
||||
goto out;
|
||||
|
||||
if (cmd->pr_abort_counter != NULL) {
|
||||
if (!atomic_dec_and_test(&cmd->pr_abort_counter->pr_abort_pending_cnt))
|
||||
goto out;
|
||||
saved_cmd_done = cmd->pr_abort_counter->saved_cmd_done;
|
||||
kfree(cmd->pr_abort_counter);
|
||||
cmd->pr_abort_counter = NULL;
|
||||
}
|
||||
saved_cmd_done = cmd->pr_abort_counter->saved_cmd_done;
|
||||
kfree(cmd->pr_abort_counter);
|
||||
cmd->pr_abort_counter = NULL;
|
||||
|
||||
saved_cmd_done(cmd, next_state, pref_context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user