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: zhong jiang <zhongjiang@huawei.com>
Acked-by: Robin Holt <robinmholt@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
zhong jiang 2018-08-17 11:42:35 +08:00 committed by Greg Kroah-Hartman
parent 2e6ae11dd0
commit 99aeebe814

View File

@ -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);