From patchwork Wed Apr 19 14:26:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13216973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64AF0C6FD18 for ; Wed, 19 Apr 2023 14:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=boBJ80AeU8i23j5lHymWm21s3mJJplsSA3smHU18A5c=; b=UhBE5NwhP+V9O6 8lV2FoIkwm73MRiF6olrgLAmGqCUWwkJG+8r9BjJRWRfCPkf6/TDxx0jolkutF5HHOwpwDX+CCL8I m1QJPF7+o5zpkxXZg3khGnUTb3msomN7oGgJe68NN+ir/1wNqhEBI6sUxk5iyoGAzBFQQjix5iGKS hQxGh+xlZteSfPy5Z2kEG/o++y2k7kxqZIvgG2KIQKDbZw1i900krKhNWnRePFlZiPoS+ApMKQ/qR RBRfMisNhZ4gWU/TeL5VAQ/P+Xct0xVS6ek4sKFoyNncuCHwaRiWrh5tFomBUGZ34LhcRCXm0iRuT On/3QOIYdYyMfGb6/B4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pp8lE-005fGl-0Z; Wed, 19 Apr 2023 14:26:16 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pp8lB-005fFW-2Z for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 14:26:15 +0000 Received: by mail-wm1-x329.google.com with SMTP id ay3-20020a05600c1e0300b003f17289710aso1520821wmb.5 for ; Wed, 19 Apr 2023 07:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681914368; x=1684506368; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=JeZNA1s0QESP/I0CqxVMnzYwGVuCPAunM/8r509Fe9w=; b=ShYYRDYCGQc99t8l2LBANPb2KPl6FYJ/5rLLIlr+3iIn1nHXCsMf4hGejSQOch/iW/ KLpdrkwNzuaTyHCMVmD7SRamW7oNIwqrQxddFKuoYjuWaeWs1JctAxvvF+FVkoCR5Xmk EsjvFK1/q9h+Z46Fz0f7p6Er60x57Bhfe76eECK8ykW0ocL22TW+KW30LsboBIN9nl1N 3fgoDWK/zC+RMJUFVqA4ACiOOldMhuVvGsgHQsZbBuP13xPWcbOIzIGiD0jP1z7b2lSJ H19z+Gm8Yj2/gpsCFTa0Kq3ks8UzOQfQwbggkHmzn4dxtVcCiDcS+6zBGChjWOVIlQCU F/Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681914368; x=1684506368; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JeZNA1s0QESP/I0CqxVMnzYwGVuCPAunM/8r509Fe9w=; b=EcrEZcbPhkfMllOCk9TlCc8ISBj6OpepVGsnt6/FHHt/uPYD6hLWEqQYQFO0xLZTpN 32PGimCKFGAKej+rG9RtOLTEDrRjHX9KKDbVUd1b1I/HNOoV6MRRcaA5WoKiS203dgdP 6rgsLGZlTy6Y2BJ5p5rNv8miviv/LwMwXJE0PARj4P2jYC9YOLhd4ORMj6pOsDHdNH0x 0VN+TFL/HPtjofxkeq7n4IAFIOuYADVHazRg2gA2TsNt6QAHT/ZEm5M5ebvkR+j36lRa 2P907m/kcsbjEP6QmdJxXyZsW9o8DdKxlBvz+v9RLwqd0E54oZYCyhb2qhg/p8CeOnRf RtVw== X-Gm-Message-State: AAQBX9d/Wu25cSQM1+BkqrmKtc8sSkYrECOVVMXq1CAg7CE7XIoesK4L x2a1WKa0TABs1dA7xND8dCKYCQ== X-Google-Smtp-Source: AKy350YovrybGst8hzvGzmZDFWnh2USQWtHYaasH+1FyJ6ozgojeUQ2NlRYNyrYogEORRcf/pt5p1Q== X-Received: by 2002:a1c:7c04:0:b0:3ed:2ae9:6c75 with SMTP id x4-20020a1c7c04000000b003ed2ae96c75mr16934529wmc.37.1681914368188; Wed, 19 Apr 2023 07:26:08 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id u19-20020a05600c211300b003f17316ab46sm2343548wml.13.2023.04.19.07.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 07:26:07 -0700 (PDT) Date: Wed, 19 Apr 2023 17:26:04 +0300 From: Dan Carpenter To: Arnd Bergmann Cc: Linus Walleij , Imre Kaloz , Krzysztof Halasa , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH] crypto: ixp4xx - silence uninitialized variable warning Message-ID: <7de7d932-d01b-4ada-ae07-827c32438e00@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_072613_843265_B73D2C9C X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Smatch complains that "dma" is uninitialized if dma_pool_alloc() fails. This is true, but also harmless. Anyway, move the assignment after the error checking to silence this warning. Fixes: 586d492f2856 ("crypto: ixp4xx - fix building wiht 64-bit dma_addr_t") Signed-off-by: Dan Carpenter Reviewed-by: Arnd Bergmann Acked-by: Linus Walleij --- drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c index ed15379a9818..4a18095ae5d8 100644 --- a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c +++ b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c @@ -1175,9 +1175,9 @@ static int aead_perform(struct aead_request *req, int encrypt, /* The 12 hmac bytes are scattered, * we need to copy them into a safe buffer */ req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags, &dma); - crypt->icv_rev_aes = dma; if (unlikely(!req_ctx->hmac_virt)) goto free_buf_dst; + crypt->icv_rev_aes = dma; if (!encrypt) { scatterwalk_map_and_copy(req_ctx->hmac_virt, req->src, cryptlen, authsize, 0);