summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorHimanshu Jha <himanshujha199640@gmail.com>2017-08-26 22:17:47 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-29 00:53:23 +0200
commit0df49584ed6f0e99f3e16d6b10acef32fe21ce0d (patch)
tree6ebe12fe6872f517a4affde782793b2be654f9d1 /drivers/net/ethernet/broadcom
parentsched: sfq: drop packets after root qdisc lock is released (diff)
downloadlinux-0df49584ed6f0e99f3e16d6b10acef32fe21ce0d.tar.xz
linux-0df49584ed6f0e99f3e16d6b10acef32fe21ce0d.zip
net: ethernet: broadcom: Remove null check before kfree
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 16a0f192daec..ecdef42f0ae6 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -1367,15 +1367,11 @@ static int sbmac_initctx(struct sbmac_softc *s)
static void sbdma_uninitctx(struct sbmacdma *d)
{
- if (d->sbdma_dscrtable_unaligned) {
- kfree(d->sbdma_dscrtable_unaligned);
- d->sbdma_dscrtable_unaligned = d->sbdma_dscrtable = NULL;
- }
+ kfree(d->sbdma_dscrtable_unaligned);
+ d->sbdma_dscrtable_unaligned = d->sbdma_dscrtable = NULL;
- if (d->sbdma_ctxtable) {
- kfree(d->sbdma_ctxtable);
- d->sbdma_ctxtable = NULL;
- }
+ kfree(d->sbdma_ctxtable);
+ d->sbdma_ctxtable = NULL;
}