diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (patch) | |
tree | b9865f0322d8e74661639f5f33b1897b23004659 /drivers/char/synclink.c | |
parent | fa671646f61182cd18234461a6e65f50c6558695 (diff) |
[PATCH] kfree cleanup: drivers/char
This is the drivers/char/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/char/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/synclink.c')
-rw-r--r-- | drivers/char/synclink.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 0133dc0e25d0..5d1ffa3bd4c3 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -4016,9 +4016,7 @@ static int mgsl_alloc_intermediate_rxbuffer_memory(struct mgsl_struct *info) | |||
4016 | */ | 4016 | */ |
4017 | static void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info) | 4017 | static void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info) |
4018 | { | 4018 | { |
4019 | if ( info->intermediate_rxbuffer ) | 4019 | kfree(info->intermediate_rxbuffer); |
4020 | kfree(info->intermediate_rxbuffer); | ||
4021 | |||
4022 | info->intermediate_rxbuffer = NULL; | 4020 | info->intermediate_rxbuffer = NULL; |
4023 | 4021 | ||
4024 | } /* end of mgsl_free_intermediate_rxbuffer_memory() */ | 4022 | } /* end of mgsl_free_intermediate_rxbuffer_memory() */ |
@@ -4072,10 +4070,8 @@ static void mgsl_free_intermediate_txbuffer_memory(struct mgsl_struct *info) | |||
4072 | int i; | 4070 | int i; |
4073 | 4071 | ||
4074 | for ( i=0; i<info->num_tx_holding_buffers; ++i ) { | 4072 | for ( i=0; i<info->num_tx_holding_buffers; ++i ) { |
4075 | if ( info->tx_holding_buffers[i].buffer ) { | 4073 | kfree(info->tx_holding_buffers[i].buffer); |
4076 | kfree(info->tx_holding_buffers[i].buffer); | 4074 | info->tx_holding_buffers[i].buffer = NULL; |
4077 | info->tx_holding_buffers[i].buffer=NULL; | ||
4078 | } | ||
4079 | } | 4075 | } |
4080 | 4076 | ||
4081 | info->get_tx_holding_index = 0; | 4077 | info->get_tx_holding_index = 0; |