Skip to content

Commit

Permalink
sparc: remove some pointless conditionals before kfree()
Browse files Browse the repository at this point in the history
Remove some pointless conditionals before kfree().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Apr 15, 2009
1 parent 6c0f8bc commit ed247e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/sparc/kernel/ldc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,8 +1183,7 @@ struct ldc_channel *ldc_alloc(unsigned long id,
free_queue(lp->tx_num_entries, lp->tx_base);

out_free_mssbuf:
if (mssbuf)
kfree(mssbuf);
kfree(mssbuf);

out_free_iommu:
ldc_iommu_release(lp);
Expand Down Expand Up @@ -1217,8 +1216,7 @@ void ldc_free(struct ldc_channel *lp)

hlist_del(&lp->list);

if (lp->mssbuf)
kfree(lp->mssbuf);
kfree(lp->mssbuf);

ldc_iommu_release(lp);

Expand Down

0 comments on commit ed247e1

Please sign in to comment.