Alpha arch development list
 help / color / mirror / Atom feed
* [PATCH] mm: Fix warning comparing pointer to 0
@ 2021-11-24 10:13 Jiapeng Chong
  2021-11-25  3:39 ` kernel test robot
  2021-11-25  4:00 ` Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-11-24 10:13 UTC (permalink / raw)
  To: rth; +Cc: ink, mattst88, linux-alpha, linux-kernel, Jiapeng Chong

Fix the following coccicheck warning:

./arch/alpha/mm/fault.c:193:52-53: WARNING comparing pointer to 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 arch/alpha/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 6c0a277..22c1f24 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -190,7 +190,7 @@
 
  no_context:
 	/* Are we prepared to handle this fault as an exception?  */
-	if ((fixup = search_exception_tables(regs->pc)) != 0) {
+	if (!(fixup = search_exception_tables(regs->pc)) {
 		unsigned long newpc;
 		newpc = fixup_exception(dpf_reg, fixup, regs->pc);
 		regs->pc = newpc;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-25  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-24 10:13 [PATCH] mm: Fix warning comparing pointer to 0 Jiapeng Chong
2021-11-25  3:39 ` kernel test robot
2021-11-25  4:00 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox