Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0df49584 authored by Himanshu Jha's avatar Himanshu Jha Committed by David S. Miller
Browse files

net: ethernet: broadcom: Remove null check before kfree



Kfree on NULL pointer is a no-op and therefore checking is redundant.

Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9ab7425
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1367,16 +1367,12 @@ 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;
	}

	if (d->sbdma_ctxtable) {
	kfree(d->sbdma_ctxtable);
	d->sbdma_ctxtable = NULL;
}
}


static void sbmac_uninitctx(struct sbmac_softc *sc)