Staging: me4000: kfree(NULL) is safe, so no extra checks needed.
Signed-off-by: Andre Haupt <andre@bitwigglers.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
705d300e1b
commit
e8aa1bd098
@@ -546,15 +546,13 @@ static void clear_board_info_list(void)
|
|||||||
&board_info->ao_context_list, list) {
|
&board_info->ao_context_list, list) {
|
||||||
me4000_ao_reset(ao_context);
|
me4000_ao_reset(ao_context);
|
||||||
free_irq(ao_context->irq, ao_context);
|
free_irq(ao_context->irq, ao_context);
|
||||||
if (ao_context->circ_buf.buf)
|
kfree(ao_context->circ_buf.buf);
|
||||||
kfree(ao_context->circ_buf.buf);
|
|
||||||
list_del(&ao_context->list);
|
list_del(&ao_context->list);
|
||||||
kfree(ao_context);
|
kfree(ao_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear analog input 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->circ_buf.buf);
|
|
||||||
kfree(board_info->ai_context);
|
kfree(board_info->ai_context);
|
||||||
|
|
||||||
/* Clear digital I/O context */
|
/* Clear digital I/O context */
|
||||||
@@ -3668,8 +3666,7 @@ AI_CONFIG_ERR:
|
|||||||
tmp &=
|
tmp &=
|
||||||
~(ME4000_AI_CTRL_BIT_CHANNEL_FIFO | ME4000_AI_CTRL_BIT_SAMPLE_HOLD);
|
~(ME4000_AI_CTRL_BIT_CHANNEL_FIFO | ME4000_AI_CTRL_BIT_SAMPLE_HOLD);
|
||||||
|
|
||||||
if (list)
|
kfree(list);
|
||||||
kfree(list);
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user