Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp445836rwd; Wed, 7 Jun 2023 02:04:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VOo2Z92QnUFiAtGvqVUcWvijJ2iR8gLWgxsZ3F3WZgI5CLpVnpEIcd/F8Luyd/tEayD5Z X-Received: by 2002:a05:6a00:1a05:b0:659:4b77:51e8 with SMTP id g5-20020a056a001a0500b006594b7751e8mr6071597pfv.15.1686128670091; Wed, 07 Jun 2023 02:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686128670; cv=none; d=google.com; s=arc-20160816; b=GBUo1yhftqfjrWKMFsnfcIYR9R7ENKrCTgoOSB3GRdSd8r9OdtuqfDe/KY0ebZQoGd IzJpcChjCifFFMsLtUH2MWLOQYsTi52BN+f4zbROwPfWnVAkgCF5Lqg1WDr7AEz10Qe0 3JM/yO0yjtUP985BMLiQy1q7HN7vKGgRo9QJQ1m07zE+3q4Mj9R3exUvWsZQ8IE4an6D A/aHLqCOpCcYsFH8hbE32UTplxikVuXxExVMblGcZYS01YmkpVJVJlSB7NW4/BcjMiqr IhEgGdNhwoLFajQUCigE89fHvFNO9gsrv/roRgKcPHD78IwbalPHE7OfjI8dRs4OTHB8 BauQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=i0NdrTonshlL/BOe+jeCJAL3DUzvRCF9nn7dYvXfpgA=; b=mVI3gJ6BL/bT42PWIuRFREoI6ugKYISM1Zd+MGPWwPLs1omkL31I8Es6DUtCw0Anyc qQ8g17NkAGTWkr6ujvi5BPaSsxp1YgljlzUuEj/wtgq2YIl1mergpMAoe5zJc2dtvshA lSF32GaIwMNfDzDXHRBVu+/KLkE4em9BxrQO/MVqt0e3Pgwg1e2xUemC2JopHwScR1pg dn4FMt8sKuKZSqz+T9QBTQEzAp5eLIENxCDutjbnWhGRzVFDh4becsMC674lu1pnHMjn 7rEA9Q9R7cDAmkZHUXPRdt47Eq6dbt02e6cnu6w4WGtlBjHk/3CfhmSdhL+njTcgFzVd kxgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ovD6gDNs; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020aa79f02000000b0065a6938177dsi4834025pfr.111.2023.06.07.02.04.17; Wed, 07 Jun 2023 02:04: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=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ovD6gDNs; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239119AbjFGIxW (ORCPT + 99 others); Wed, 7 Jun 2023 04:53:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238859AbjFGIwz (ORCPT ); Wed, 7 Jun 2023 04:52:55 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845E430C1; Wed, 7 Jun 2023 01:51:26 -0700 (PDT) Received: from zn.tnic (pd9530d32.dip0.t-ipconnect.de [217.83.13.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 141B01EC070A; Wed, 7 Jun 2023 10:51:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1686127877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=i0NdrTonshlL/BOe+jeCJAL3DUzvRCF9nn7dYvXfpgA=; b=ovD6gDNsAoZKr0mmK15yDaJkRuClKaJF7dB6L49Rx9rUF2Bey3G8A4Iqxm4nDONlJ3skGu 3ddytbBAPm+bdAV7oXpm8C6rOs4WgoC5Z1avOllxU+xSU9jbuEXhEnopMQR+Q8KxdzqdCi tXU9rWFOrXwAiHZh+o8MlFF2IPVOvOg= Date: Wed, 7 Jun 2023 10:51:10 +0200 From: Borislav Petkov To: Yeqi Fu Cc: dinguyen@kernel.org, tony.luck@intel.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] EDAC/altera: Fix error checking Message-ID: <20230607085110.GAZIBE/gLYW5szBwwo@fat_crate.local> References: <20230517191556.367689-1-asuk4.q@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230517191556.367689-1-asuk4.q@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_NONE,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 On Thu, May 18, 2023 at 03:15:56AM +0800, Yeqi Fu wrote: > The function edac_debugfs_create_dir returns ERR_PTR if an error > occurs, and the appropriate way to verify for errors is to use the > inline function IS_ERR. The patch will substitute the null-comparison > with IS_ERR. > > Signed-off-by: Yeqi Fu > --- > drivers/edac/altera_edac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c > index 8b31cd54bdb6..19693333408f 100644 > --- a/drivers/edac/altera_edac.c > +++ b/drivers/edac/altera_edac.c > @@ -683,7 +683,7 @@ static void altr_create_edacdev_dbgfs(struct edac_device_ctl_info *edac_dci, > return; > > drvdata->debugfs_dir = edac_debugfs_create_dir(drvdata->edac_dev_name); > - if (!drvdata->debugfs_dir) > + if (IS_ERR(drvdata->debugfs_dir)) > return; > > if (!edac_debugfs_create_file("altr_trigger", S_IWUSR, > -- Applied, thanks. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette