Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6363198pxb; Tue, 15 Feb 2022 00:18:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCqEGe5Cz8euSrsWcrYftCKOdcMm2i4FN+d4On78xT1Q2vpjEhCtNdt3B0vp9ffLZx80SO X-Received: by 2002:a17:906:1e0e:: with SMTP id g14mr2004700ejj.363.1644913096662; Tue, 15 Feb 2022 00:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644913096; cv=none; d=google.com; s=arc-20160816; b=N+4Px6Egq5ncOm75/ul4LMWtYLq+HRnrxwUkTKkqd4zIxYWBnsonJoKJWeMG/k2zqP ryaamGo8sorjTcyFeObFFaq+DbxkMGDk+Z4L1LmmVchBsBJJF/wyyttEn/BrtQ9Kdt3K mW4mjYgwvIlDWd1kBlyMJtoROfN+y8scnHWmDUWZoOIybzleRvsFNLADUgbA2ILxIdqS 9Vw5hOmUfrMzafdlzgW8gFGgXinj62DnpRvn9TFOVswfK7aX9z5/rghgrOwrVy8RqJzW Uv6YwCs+PN02Hc/4eMG/RqkwMiv1LT52LS9NJTcmtpHQ/I4agd4RELxpg4To0RsOqhYU TKag== 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=cGvhbNBJveMcI7AJ89SRjQ09ycWOIcnqP82nCi8S9aE=; b=o2olepaInE7YzdSreqnfMxfpCpKYGH+lxBlaf9LAOoGdsAzKw+SAtq355XfNX1dfWP Sh0ffqhR48tAJcmPGGP+y1Uq7Y0q8hZT41zBSOF9be6ZO3/EjpXkfCZOarJLLl57wlEs AQAw7cRVyuvNVKZx38eo5Zm/Fq5WSoQlHR/l40PVgcNcV6sHr3IWmma52QcZ5qnBSs/F jBuf6DahJ06kOb1cSkHeJjSTU+GDvxJKENjBAikEGCWzSlhoWrhrO81g282YP8FUomO3 jhxlOJezeQohZOT1R4wJ29W5mYVxdv6cxavasL2Aqk4AUAwqRuF+K5mC3u6CuN8mkHEm 3UiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb26si2022844ejc.529.2022.02.15.00.17.54; Tue, 15 Feb 2022 00:18:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233499AbiBODgv (ORCPT + 99 others); Mon, 14 Feb 2022 22:36:51 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiBODgu (ORCPT ); Mon, 14 Feb 2022 22:36:50 -0500 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C244B7EDA2 for ; Mon, 14 Feb 2022 19:36:41 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0V4WYIki_1644896194; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V4WYIki_1644896194) by smtp.aliyun-inc.com(127.0.0.1); Tue, 15 Feb 2022 11:36:38 +0800 From: Jiapeng Chong To: kbusch@kernel.org Cc: axboe@fb.com, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] nvme: Fix missing error code in nvme_configure_directives() Date: Tue, 15 Feb 2022 11:36:32 +0800 Message-Id: <20220215033632.104124-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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-kernel@vger.kernel.org The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/nvme/host/core.c:780 nvme_configure_directives() warn: missing error code 'ret'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 79005ea1a33e..53b37f333170 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -777,6 +777,7 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl) if (ctrl->nssa < BLK_MAX_WRITE_HINTS - 1) { dev_info(ctrl->device, "too few streams (%u) available\n", ctrl->nssa); + ret = -EINVAL; goto out_disable_stream; } -- 2.20.1.7.g153144c