aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/synclink.c')
-rw-r--r--drivers/char/synclink.c10
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 */
4017static void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info) 4017static 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;