powerpc/mm: Fix comparing pointer to 0 warning
Fixes coccicheck warning: ./arch/powerpc/mm/pgtable_32.c:87:11-12: 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> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1604976961-20441-1-git-send-email-kaixuxia@tencent.com
This commit is contained in:
parent
62182e6c0f
commit
b84bf098fc
|
@ -84,7 +84,7 @@ int __ref map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot)
|
|||
pg = pte_alloc_kernel(pd, va);
|
||||
else
|
||||
pg = early_pte_alloc_kernel(pd, va);
|
||||
if (pg != 0) {
|
||||
if (pg) {
|
||||
err = 0;
|
||||
/* The PTE should never be already set nor present in the
|
||||
* hash table
|
||||
|
|
Loading…
Reference in New Issue