projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9ab742
)
net: ethernet: broadcom: Remove null check before kfree
author
Himanshu Jha
<
[email protected]
>
Sat, 26 Aug 2017 20:17:47 +0000
(
01:47
+0530)
committer
David S. Miller
<
[email protected]
>
Mon, 28 Aug 2017 22:53:23 +0000
(15:53 -0700)
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/sb1250-mac.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/sb1250-mac.c
b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 16a0f192daecc34dea63b76ecb0046bd8c9f0bf6..ecdef42f0ae63641419a603f0b4eec2fc213c334 100644
(file)
--- 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;
}