Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp758738ybx; Thu, 31 Oct 2019 00:04:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvjC0BWwUOec7Obk0cThpZ6HPDw1qiLbnnucrI1tZpXnM5cAEt5PjpQNMiuCOmp3WFL7bb X-Received: by 2002:a50:b558:: with SMTP id z24mr4183230edd.67.1572505444853; Thu, 31 Oct 2019 00:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572505444; cv=none; d=google.com; s=arc-20160816; b=fFnlv8Bnm+W/3Nk10Rsco4y5WbRQxOZ5hGiT4b1qNMXm7MYvtQQHCy6F1HlbCTsss0 Tr8QJkwwUcSEapqyl5O/TKsJYrPECDXmQjA1IyqoTUtHmkO30LcgktQDnfrWyjeitL84 Yde6L3iPWwqqd0AomQGCt8CD2eITyqVqO3sqnpQCsAo0bkUVkh4lzPW8j5K+ydDE/b5O cBUJSne2d2vq6W0onfNKWQEYsQM1g4Z1/6hv3ja475yh5Izcx/P6ed37sqS55fYp0ygs 3SHlQVUzKuRzIjkWR/+0kmXP+3w/uY8QidiA7/Y5B5vn4lNFtzdIEqQYsIVJAChk3PKt HHJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:from:subject; bh=3Sml2F2P7+Gl6CoLYYhHjfiRf/eoD0d2+dqIG8yCZP8=; b=lAM7PH6GFrRVnBVyDMGSiA5sIz/fE3JWO8z3ksUOR8axxALbG815JQaRhg3yb8DIiH ktzZbAtGGW1mTkxtO1Q8ImPWA0QbuoNgy7fYa9zL+1/Tj+MuVwJ62KUHe7lgHICJ0dl3 reOTOxDyhZlix+3VCP+7rcXtoUNwqdpHT7POHH3Zt/hNzikjVZxNUMs3lptArjpQ+uyj ++A5YELVyXMgtZzRdGVvJsoODTRpiMi7tCqq4gEsrvW24LCZasDplAMaY7rAc13I3QFb E+J0bgc6abmy5cDULufA9c6VoqO/8jXLLtUOqRbmpcJoGFbnZm+Zjo5p9pAotAiYfZq7 0FKQ== 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 hh12si2703678ejb.343.2019.10.31.00.03.25; Thu, 31 Oct 2019 00:04:04 -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 S1726575AbfJaHCR (ORCPT + 99 others); Thu, 31 Oct 2019 03:02:17 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726535AbfJaHCR (ORCPT ); Thu, 31 Oct 2019 03:02:17 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 269BFEE5CC8800A2EB72; Thu, 31 Oct 2019 15:02:15 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Thu, 31 Oct 2019 15:02:08 +0800 Subject: [PATCH v3] crypto: arm64/aes-neonbs - add return value of skcipher_walk_done() in __xts_crypt() From: Yunfeng Ye To: Herbert Xu , , , , , , , , , "linfeilong@huawei.com" References: Message-ID: <32b39396-d514-524f-a85c-3bc627454ba7@huawei.com> Date: Thu, 31 Oct 2019 15:01:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org A warning is found by the static code analysis tool: "Identical condition 'err', second condition is always false" Fix this by adding return value of skcipher_walk_done(). Fixes: 67cfa5d3b721 ("crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS") Signed-off-by: Yunfeng Ye Acked-by: Ard Biesheuvel --- v2 -> v3: - add "Acked-by:" v1 -> v2: - update the subject and comment - add return value of skcipher_walk_done() arch/arm64/crypto/aes-neonbs-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/crypto/aes-neonbs-glue.c b/arch/arm64/crypto/aes-neonbs-glue.c index ea873b8904c4..e3e27349a9fe 100644 --- a/arch/arm64/crypto/aes-neonbs-glue.c +++ b/arch/arm64/crypto/aes-neonbs-glue.c @@ -384,7 +384,7 @@ static int __xts_crypt(struct skcipher_request *req, bool encrypt, goto xts_tail; kernel_neon_end(); - skcipher_walk_done(&walk, nbytes); + err = skcipher_walk_done(&walk, nbytes); } if (err || likely(!tail)) -- 2.7.4.3