mirror of https://gitee.com/openkylin/linux.git
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: Tosk Robot <tencent_os_robot@tencent.com> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b3554aa247
commit
76962e0393
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue