Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1560812ybj; Fri, 20 Sep 2019 12:28:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHAFeTTyU6Q8dkrYGQ9TH436zugTbvjUMH4qp1bDmDfZUCB1aH/0sYZ+M2pwQkUATG17tY X-Received: by 2002:aa7:cb46:: with SMTP id w6mr24843345edt.238.1569007713025; Fri, 20 Sep 2019 12:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569007713; cv=none; d=google.com; s=arc-20160816; b=DgtjNA1qq2JPCoLT3Uq5UfsqgjkAY0cRrvLmDAVzVbQ+FLnjP7hNMzkLQ1nYgG0N5d ijiS4w2WJx1cYJ6dy0TBxH7dSCnH6CbyheomgxnYk/juGz11ENCYwZob3iU688e8MBQe xKdsdkIZ0uB5QmjxedsdSiT3J9BssJjEZGsn7lXJbGFGhgjT9Xny4JB8nSY5qn9gEB2N s/++1UfqO751HMhY/D4zDpocqSPqO8X6Me+Qs7GlHsEyIA+eIA7bOA4hEmcgqPyAKqik UGiE8v0cpMJdiRoDJ+0B/1yE1ONE6GkVHDeIU/HtspRUOw9XYmcrnxHwvWlEe6pkABb8 QeMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2QezPi+CwWGZufCQCuLHAOrHdRaKsP9fUqVaKeaSE4Q=; b=zGe/KKe36svs/SHCBeRqYs/1ldI3V3+G3grxm2eDuhjleGjOSgpTi3cdeuKdpn7QSs 9Ju0ur34pMd56lp/nMyi5ItOTSOtYurTKE0oCul+Q2V2s0OUp27/+d/JKw48kz5+LgXK JDSqCa+1piJHKbQSGArPSU/7TVxHc3/gZ0ZcmgAwDhmBsJnU/UJXyqBElIMfTlv5rKC8 TgxQGsnDdckUhl3ZgKVgN4GbBH9xZu87ESaW1sZ0pTSoLytxMCbaZzA6Ir2stRqgmad1 wVJh3HzmUqCCRTHXbXJr6VtVDaxNM0iyubFaut9qIU1adCmekce4L3dwl3cdt37JEeMN BJ4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c28si2051516ede.3.2019.09.20.12.28.08; Fri, 20 Sep 2019 12:28:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbfITNCQ (ORCPT + 99 others); Fri, 20 Sep 2019 09:02:16 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:34604 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726807AbfITNCQ (ORCPT ); Fri, 20 Sep 2019 09:02:16 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iBIWN-0007ow-V7; Fri, 20 Sep 2019 23:00:25 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 20 Sep 2019 23:00:21 +1000 Date: Fri, 20 Sep 2019 23:00:21 +1000 From: Herbert Xu To: Yunfeng Ye Cc: wangzhou1@hisilicon.com, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: hisilicon - Fix return value check in hisi_zip_acompress() Message-ID: <20190920130021.GD23242@gondor.apana.org.au> References: <23be2eb5-8256-0c19-aef9-994974d11c9d@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23be2eb5-8256-0c19-aef9-994974d11c9d@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Sep 16, 2019 at 02:38:25PM +0800, Yunfeng Ye wrote: > The return valude of add_comp_head() is int, but @head_size is size_t, > which is a unsigned type. > > size_t head_size; > ... > if (head_size < 0) // it will never work > return -ENOMEM > > Modify the type of @head_size to int, then change the type to size_t > when invoke hisi_zip_create_req() as a parameter. > > Fixes: 62c455ca853e ("crypto: hisilicon - add HiSilicon ZIP accelerator support") > Signed-off-by: Yunfeng Ye > --- > drivers/crypto/hisilicon/zip/zip_crypto.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt