Commit 99aeebe8 authored by zhong jiang's avatar zhong jiang Committed by Greg Kroah-Hartman

misc: sgi-xp: remove meaningless null check before kfree

kfree has taken null pointer into account. so check the null pointer
before kfree is meaningless.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Acked-by: default avatarRobin Holt <robinmholt@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e6ae11d
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment