lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <258e87a54a1dd59b4f3d62ba9fa42242@208suo.com>
Date:   Wed, 14 Jun 2023 14:59:20 +0800
From:   wuyonggang001@...suo.com
To:     peterx@...hat.com, viro@...iv.linux.org.uk
Cc:     linux-alpha@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] alpha/mm: Fix comparing pointer

Fix the following coccicheck warning:

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

Signed-off-by: Yonggang Wu <wuyonggang001@...suo.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 7b01ae4f3bc6..31db549ef0b5 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -197,7 +197,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 != NULL) {
          unsigned long newpc;
          newpc = fixup_exception(dpf_reg, fixup, regs->pc);
          regs->pc = newpc;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ