Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp603876pxj; Thu, 13 May 2021 12:19:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzMfKgo+Oc3vTB7iUYirXm3HNLdkDWpc2oeDCc+3C54dRY5fW9jfahOBmcNrzeoYWaAZCD X-Received: by 2002:a02:b698:: with SMTP id i24mr39550521jam.121.1620933596330; Thu, 13 May 2021 12:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620933596; cv=none; d=google.com; s=arc-20160816; b=aOy0tkOJvPKfdHjsJy/4HRvTW/XalkFbGWBfNdl1lryUKfKo8N1qTISrjPOFjLqM7z OAFSE9vkARER1DX9wDFTMj4jjYYi8USFC+7L2Mtz7MjTuA6ahE856bzsRffpSGNhfvMG XMacsADNISjHGwpugJCGe9VuL5svFHe5/sOQbbg6JGAr9ogtTgAPAsa6dsiBKYEtHy2V qxviI6l8hto6ww5jOmwHFnO+9c8JegLlmB/IiukcvuYOAtT4QrpVkyiXFcGiXod+JGzh n4CVRCs3W1w6x1iqhBgHXCBr2GN9YxCdwPhG2V3Tpb38inx6if4+a8hkb4nJ0c9vBIxX u/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UUlE+XNxg2jReS5huBlLWG3UPhEU/FuKXhSNqpBJHiE=; b=IDKNFqql8qtSH9LXiXLiD4/XyaU3zstVpfvbjFuG9AsfqEswkdqSIdP4ntf+tD09hO qBbvD1LzTEsBIa6IGHjXAOJWN+YUdkDgwbmYDKaWY+/bSoQt9tiAU7BIYGRhSIYr0Zle O7cNZ5JPvvtZHcR7waDYmaps71Rd+cMt/ypGNyPYwciRQgvpQyusdaj7Irl1vZ+CevuH 3nY6e0DO9lrUmWQ6US81Xsi8NMCcpiv5oFxDQJgBq/LV3VDzJOLJvVH9WahIjoVjEVPA uJxP2uSP75xUxhU9Sr+5h7TahrWp09YP7U3iBsqqhpNz0rk3NDKs5NlW42fCtAd4Qa9G BmBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si4646011iog.54.2021.05.13.12.19.42; Thu, 13 May 2021 12:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233163AbhEMMBM (ORCPT + 99 others); Thu, 13 May 2021 08:01:12 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33258 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbhEMMBJ (ORCPT ); Thu, 13 May 2021 08:01:09 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lhA0O-00018f-8F; Thu, 13 May 2021 11:59:52 +0000 From: Colin King To: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nvme: remove redundant initialization of variable ret Date: Thu, 13 May 2021 12:59:52 +0100 Message-Id: <20210513115952.58482-1-colin.king@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 37943dc4c2c1..74bf2c7f2b80 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1088,7 +1088,7 @@ static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl) static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new) { - int ret = -EINVAL; + int ret; bool changed; ret = nvme_rdma_configure_admin_queue(ctrl, new); -- 2.30.2