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:
2e6ae11
)
misc: sgi-xp: remove meaningless null check before kfree
author
zhong jiang
<
[email protected]
>
Fri, 17 Aug 2018 03:42:35 +0000
(11:42 +0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 14 Sep 2018 13:36:20 +0000
(15:36 +0200)
kfree has taken null pointer into account. so check the null pointer
before kfree is meaningless.
Signed-off-by: zhong jiang <
[email protected]
>
Acked-by: Robin Holt <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/misc/sgi-xp/xpc_partition.c
patch
|
blob
|
history
diff --git
a/drivers/misc/sgi-xp/xpc_partition.c
b/drivers/misc/sgi-xp/xpc_partition.c
index 0c3ef6f1df54662f4ab3002dddb4ff20e1449c0d..3eba1c420cc0831897c906df4ddcbaf0b1010213 100644
(file)
--- a/
drivers/misc/sgi-xp/xpc_partition.c
+++ b/
drivers/misc/sgi-xp/xpc_partition.c
@@
-98,8
+98,7
@@
xpc_get_rsvd_page_pa(int nasid)
len = L1_CACHE_ALIGN(len);
if (len > buf_len) {
- if (buf_base != NULL)
- kfree(buf_base);
+ kfree(buf_base);
buf_len = L1_CACHE_ALIGN(len);
buf = xpc_kmalloc_cacheline_aligned(buf_len, GFP_KERNEL,
&buf_base);