mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
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>
This commit is contained in:
parent
f9ab7425b3
commit
0df49584ed
1 changed files with 4 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue