Commit 76962e03 authored by Kaixu Xia's avatar Kaixu Xia Committed by David S. Miller
Browse files

sparc32: Fix comparing pointer to 0 coccicheck warning



Fixes coccicheck warning:

/arch/sparc/mm/srmmu.c:354:42-43: WARNING comparing pointer to 0

Avoid pointer type value compared to 0.

Reported-by: default avatarTosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: default avatarKaixu Xia <kaixuxia@tencent.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3554aa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm)
	pte_t *ptep;
	struct page *page;

	if ((ptep = pte_alloc_one_kernel(mm)) == 0)
	if (!(ptep = pte_alloc_one_kernel(mm)))
		return NULL;
	page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT);
	spin_lock(&mm->page_table_lock);