diff options
author | Andre Haupt <andre@bitwigglers.org> | 2009-01-26 16:12:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:53:24 -0700 |
commit | e8aa1bd0987bd66ae2a44c05cdacf5cea83b6d62 (patch) | |
tree | 7ea0d065b2b34d0c44139911fb19aca37fe56bc4 /drivers/staging/me4000/me4000.c | |
parent | 705d300e1bcb5e2724690b6deb89fbfc453d790e (diff) |
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>
Diffstat (limited to 'drivers/staging/me4000/me4000.c')
-rw-r--r-- | drivers/staging/me4000/me4000.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/me4000/me4000.c b/drivers/staging/me4000/me4000.c index 8f0dbcc613f..bfdf3e17d37 100644 --- a/drivers/staging/me4000/me4000.c +++ b/drivers/staging/me4000/me4000.c @@ -546,15 +546,13 @@ 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); + 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->circ_buf.buf); kfree(board_info->ai_context); /* Clear digital I/O context */ @@ -3668,8 +3666,7 @@ AI_CONFIG_ERR: tmp &= ~(ME4000_AI_CTRL_BIT_CHANNEL_FIFO | ME4000_AI_CTRL_BIT_SAMPLE_HOLD); - if (list) - kfree(list); + kfree(list); return err; |