Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1765717rwe; Fri, 2 Sep 2022 03:33:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hmFE8rndnxU3ZNIA9+qJeuQ1vSAHY0sgGR9Lm/yKQq4BpoF6WEjHN6522cuazxD6qAMxb X-Received: by 2002:a17:906:7954:b0:74d:ed4f:c7f0 with SMTP id l20-20020a170906795400b0074ded4fc7f0mr2857558ejo.674.1662114838102; Fri, 02 Sep 2022 03:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662114838; cv=none; d=google.com; s=arc-20160816; b=pn9C2/vQnehNST5MFyhYHWQ3Vsx/SvU3cFEVHqG+96rdvIW/TwYeOe6mGMPdDT0rcZ qYbpHnKNceHN0TbUkLkEZ/VmKvAkRs2VQaJBPqdDx343uIdsrsRDEMwFbL0+jk27FP/V H33aD/pC54IO+dMJBtS+a0VMcRZXp72pFSpXdClsKzcblSE4Jxv8UZ7p7C+xNXM/PbWL +ldgAH5fHA+xjMAXUZ9pOZTU5DbJ89nB4mGIhpKVtYY9DDTwzpKOneeEvNFlir50e7su O/1APWQhqtnYxM/Mhww3ZHE5gYfFHqyQc86/uua9JGCCNSOLs87Bqeg5ITMG+t6DX/iU G5fA== 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; bh=gIif3i704IQ6bAafvNdXdxI2+/fIyE6xlW09uMGcN8M=; b=nATbfs2+v1NmQZBdxmeQft1QDbZQn/lAjIo9UMCpl0OJwSmxw2dQdX+njn/jiSvChC SFSdOMFaUUbJGuJOnEXZai/gD5AwXYmZnDR2A6kgGLAtXyQhQyoSJ4HN9kWyyZHfipiO eFx7Jy6ukajthwVJFqfuJf7zJxuBoGqxp1lZcpSRqq1VHb+TYVi9yUk6NWyMSsnLbxyi lKwt4Y51cgqg6RUitE2iT44d6O5GYlLqVRQQZBLGAd2k74bGx6O8jQEtXuAqQRzBjOYQ b90J9bQG6Q+iM/7mWI1B8EBJJW1AJR9GWeyA29VqDtzFvjyarfLO9XErmH08yafGJHta K9dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-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 dt9-20020a170907728900b0073d69e037c5si1870630ejc.350.2022.09.02.03.33.33; Fri, 02 Sep 2022 03:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233640AbiIBKZy (ORCPT + 99 others); Fri, 2 Sep 2022 06:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235795AbiIBKZw (ORCPT ); Fri, 2 Sep 2022 06:25:52 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A785926E; Fri, 2 Sep 2022 03:25:50 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oU3rt-000Kmt-Km; Fri, 02 Sep 2022 20:25:46 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 02 Sep 2022 18:25:45 +0800 Date: Fri, 2 Sep 2022 18:25:45 +0800 From: Herbert Xu To: cuigaosheng Cc: davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next 1/2] crypto: api - Fix IS_ERR() vs NULL check Message-ID: References: <20220825084138.1881954-1-cuigaosheng1@huawei.com> <20220825084138.1881954-2-cuigaosheng1@huawei.com> <0ae57826-6a8c-b08b-2889-f91d50bf6e59@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ae57826-6a8c-b08b-2889-f91d50bf6e59@huawei.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-crypto@vger.kernel.org On Thu, Aug 25, 2022 at 09:10:49PM +0800, cuigaosheng wrote: > Thanks for taking the time to review this patch. > > crypto_alloc_test_larval() will return null if manager is disabled, > it will not return error pointers, IS_ERR should not be used to checking > return value, should we fix it? or use another solution? That's because NULL is returned indicating success. When a genuine error occurs then an error pointer will be returned. IS_ERR will be true only in case of a genuine error. It will be false when either NULL or a real larval pointer is returned. You need to describe your problem more clearly as I have no idea what you're trying to fix. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt