Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E1C9C433F5 for ; Wed, 24 Nov 2021 10:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239534AbhKXKRA (ORCPT ); Wed, 24 Nov 2021 05:17:00 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:52659 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbhKXKQ6 (ORCPT ); Wed, 24 Nov 2021 05:16:58 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Uy7Vf0k_1637748823; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Uy7Vf0k_1637748823) by smtp.aliyun-inc.com(127.0.0.1); Wed, 24 Nov 2021 18:13:47 +0800 From: Jiapeng Chong To: rth@twiddle.net Cc: ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] mm: Fix warning comparing pointer to 0 Date: Wed, 24 Nov 2021 18:13:38 +0800 Message-Id: <1637748818-21730-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./arch/alpha/mm/fault.c:193:52-53: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- 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