Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3457066iog; Mon, 20 Jun 2022 21:36:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFcqEQPEw/JpZEnf1jGe/tQ18i9yh6yAXVJEFJeRGkj+7rr4N9affh+q2Gr39Ae4EKvWTY X-Received: by 2002:a17:907:2dab:b0:722:d45e:70f7 with SMTP id gt43-20020a1709072dab00b00722d45e70f7mr4268479ejc.28.1655786198462; Mon, 20 Jun 2022 21:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655786198; cv=none; d=google.com; s=arc-20160816; b=heuFZKZfZyyl0/uvHyo7e2HeSD8yLD9J71hTy5MwXymzn5kzQ2oAp/Lk0CtESDHC3I piEXTIrDUtLmoxQyFBRFWd89i+EDIzsDzJRQxmClmqnGilKrsmm041G9W/BWNf+EpUl0 3vspPyFXCZYoUkSRwOtpKX9geSPSPENp4Iv6bkEZQb97pJJFryXRnxvUD9+BkVh1g40T NFl4Lo2X+cxr86+ya+3gbqjEOne0jOMESasyiNSerTSdFDmtaZep9qN0l6sEuWicHCJ9 XitiachoiuiU4d3jddQPYJpCFdEMLHXa8TfPDEQjjFwWvb3UCWFBLcQ7Z8k7thDwQHYf X4bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=U0BqLeju9hz0KBhLTT//fkVJLwIQn2N78aKieNqeIJg=; b=T9ePoJgv0GGnsxXq8EWmpIzfszAdTro1pKFoW2g7cTdbIdA4A0LnNmKBu2OBaD2Hjh 8phOpdVdGQrYvMRDeTPj4t4oNwmE5xZqCncvwff1V91wQ8mcT1/kVbhpuPeV0xtSytnV mVgPhwT/0XAl0cT4fdp/JWz/zHrwb7OYssMB0r5mFuEjIk5O9CgyxIdyOsxEf8kwZK4W C4yEvJsF1h1/zm6DwW6xg4rvDYfjYDAc/A42Eo1kTjkeDc92z09ZVxJ7yD/zvx+WeRxw k6Nd91fdc7bnFEsmgYqGi5EgXxIJ1nWNuOsdtlo7X1ZTd+/vbnKQbJ+fjBsB1CqbrHLq I8Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne40-20020a1709077ba800b006f42a32ebcdsi14031010ejc.753.2022.06.20.21.36.12; Mon, 20 Jun 2022 21:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343906AbiFUDtu (ORCPT + 99 others); Mon, 20 Jun 2022 23:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237675AbiFUDtp (ORCPT ); Mon, 20 Jun 2022 23:49:45 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEFA418E19; Mon, 20 Jun 2022 20:49:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R831e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VH.K7.0_1655783380; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VH.K7.0_1655783380) by smtp.aliyun-inc.com; Tue, 21 Jun 2022 11:49:40 +0800 From: Yang Li To: rth@twiddle.net Cc: ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] mm: Fix warning comparing pointer to 0 Date: Tue, 21 Jun 2022 11:49:39 +0800 Message-Id: <20220621034939.111812-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./arch/alpha/mm/fault.c:197:52-53: WARNING comparing pointer to 0 Reported-by: Abaci Robot Signed-off-by: Yang Li --- 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