Commit e8aa1bd0 authored by Andre Haupt's avatar Andre Haupt Committed by Greg Kroah-Hartman

Staging: me4000: kfree(NULL) is safe, so no extra checks needed.

Signed-off-by: default avatarAndre Haupt <andre@bitwigglers.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 705d300e
......@@ -546,14 +546,12 @@ static void clear_board_info_list(void)
&board_info->ao_context_list, list) {
me4000_ao_reset(ao_context);
free_irq(ao_context->irq, ao_context);
if (ao_context->circ_buf.buf)
kfree(ao_context->circ_buf.buf);
list_del(&ao_context->list);
kfree(ao_context);
}
/* Clear analog input context */
if (board_info->ai_context->circ_buf.buf)
kfree(board_info->ai_context->circ_buf.buf);
kfree(board_info->ai_context);
......@@ -3668,7 +3666,6 @@ AI_CONFIG_ERR:
tmp &=
~(ME4000_AI_CTRL_BIT_CHANNEL_FIFO | ME4000_AI_CTRL_BIT_SAMPLE_HOLD);
if (list)
kfree(list);
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment