* [PATCH -next] mm: Fix warning comparing pointer to 0
@ 2022-06-21 3:49 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2022-06-21 3:49 UTC (permalink / raw)
To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel, Yang Li, Abaci Robot
Fix the following coccicheck warning:
./arch/alpha/mm/fault.c:197:52-53: WARNING comparing pointer to 0
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
arch/alpha/mm/fault.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index ef427a6bdd1a..bb3fe2949313 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -194,7 +194,8 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
no_context:
/* Are we prepared to handle this fault as an exception? */
- if ((fixup = search_exception_tables(regs->pc)) != 0) {
+ fixup = search_exception_tables(regs->pc);
+ if (fixup) {
unsigned long newpc;
newpc = fixup_exception(dpf_reg, fixup, regs->pc);
regs->pc = newpc;
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-21 3:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 3:49 [PATCH -next] mm: Fix warning comparing pointer to 0 Yang Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®