alpha/mm: Fix comparing pointer
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 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 <[email protected]>
--- arch/alpha/mm/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/alpha/mm/fault.c +2 -1
@@ -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;
Quoted 5 lines · On Wed, Jun 14, 2023 at 02:59:20PM +0800, [email protected] wrote:
Fix the following coccicheck warning:
arch/alpha/mm/fault.c:200:52-53: WARNING comparing pointer to 0
Signed-off-by Yonggang Wu <[email protected]>
Acked-by Peter Xu <[email protected]>
Signature · 1 line
Peter Xu