Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2278509rwd; Wed, 14 Jun 2023 00:03:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ts1kii00HgCNI8xB+cUZHtQO+b7ZwNMdofVuTrb2F6/nFokQkdIVznUbFmHA6f47o/FXI X-Received: by 2002:a17:902:b949:b0:1b3:97a7:c106 with SMTP id h9-20020a170902b94900b001b397a7c106mr10041933pls.52.1686726211011; Wed, 14 Jun 2023 00:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726210; cv=none; d=google.com; s=arc-20160816; b=tezW1zd8y9sVDtkd4lUKxR7EZD0yqixU1EFNN5pKYCJRolRWKCoS53iQvnIsedsEtc RhwoKoWYfupF/QIF5ZclGePYUbrsPU8bUQMl8WbIT7LFKPmOoVeiFQAAcxXRw/nCeT3h v+RetIuDgproIaIxGLz1WO6DWikaETvnsjtS+WZvo2oi4wu/3QHQqGEG1K8GsvdU1pBG r3Jawd+uGyQdUj7gCRoXE51HKfe+u9KN08Z3Ag2D21k1H0sd6xFh6C6ddHYhpht7NcPV DIzcrBT3umbm07ZDQ5J3XNQrT3NKExg7ouA4ln3foD5eEJRBwVTmfp1TGEHdu01uiSkt 4iMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=R9fkp7mYjBy1WgxAY7akpn2swflrT7r7Ujrk6+QkSbI=; b=CQ7aLrveY2kLmZuB4bMHFpVnFiVBvmcg6cJz+gfj2LG3ioHjvGokcuam0lXPUP7cju LBUGvXwlIqFy7W1PwyQH3WXAh6+tmEynrxQ8esRSfyzzjfz/jP2zE3skwVGPVvQTAgm6 LjmdszcGJjLav56lgYHPbhGXl/RaWRVq/BTLfOBHOHYQhaPoXTNkHtvfsOffQcMki/Ce 33VuEFfPGsVwpy0PIrSqzE87K5Y+ZeRUhudHyYQCxQjlWkbqMt0K+NNT/LRMm7U88eU5 CPWm+SZTIWz8X6ErJnigGwsOhO2Ax7RdtkjiOm3rrKPK0eGoigYlDXCJkadd6/kiIgMk NKeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=j7jCm9UZ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a170902a71200b001a6ff6a83e2si9748045plq.522.2023.06.14.00.03.19; Wed, 14 Jun 2023 00:03:30 -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; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=j7jCm9UZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238499AbjFNG72 (ORCPT + 99 others); Wed, 14 Jun 2023 02:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237570AbjFNG7X (ORCPT ); Wed, 14 Jun 2023 02:59:23 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87514198D for ; Tue, 13 Jun 2023 23:59:22 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4Qgx9h3LnCzBQJYj for ; Wed, 14 Jun 2023 14:59:20 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1686725960; x=1689317961; bh=M4zJl5qkZeh/H9ESI31UdmagVvc YkNvG1PgXOWZNocs=; b=j7jCm9UZIjpsToDyjjGhSbYHS3gsT/Ks3FBlGo0ILF+ jVc5m3oYoPT0AVhFeiPLSJHIWFoU0osv1M9TD5Wuy3wpKsZ9lMlb8pnUIUVMe63Y rPuceoFUVzgabnCUEGan2TGR/7iGAcWqOomGTBtIUM2KX1w8nm2fWrHlby13cvO8 PYQjGHlbU39M7iOXeZ1mPtTk+cua1x42YspLrJiqU4lPSA+6X75FQwAHiSvltk65 w9IeEyqHxCOzVUvDA0Zpb+70MQY8ms4aJqCFENDgxJeWMClFqMkBViC84hk4Zsn6 MIiHdOWAnxz5LmPFcufldr9qMv9KzaZ3RkkQ15SFF3w== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Tnkl7NdCUXck for ; Wed, 14 Jun 2023 14:59:20 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4Qgx9h27QLzBJLB3; Wed, 14 Jun 2023 14:59:20 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 14:59:20 +0800 From: wuyonggang001@208suo.com To: peterx@redhat.com, viro@zeniv.linux.org.uk Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] alpha/mm: Fix comparing pointer In-Reply-To: <20230614065602.29731-1-zhanglibing@cdjrlc.com> References: <20230614065602.29731-1-zhanglibing@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <258e87a54a1dd59b4f3d62ba9fa42242@208suo.com> X-Sender: wuyonggang001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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:200:52-53: WARNING comparing pointer to 0 Signed-off-by: Yonggang Wu --- 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;