Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp368556pxb; Thu, 9 Sep 2021 02:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDUkauEnmXc3eqR1X5fPhe1MvMYOwHXV5mO2xfilpQSJHGQtvAUpAvE6+7ECclVPOU3jY5 X-Received: by 2002:a05:6638:4195:: with SMTP id az21mr2072480jab.40.1631181128392; Thu, 09 Sep 2021 02:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631181128; cv=none; d=google.com; s=arc-20160816; b=LTuFZvFqs27z7d0OQiOm8O8Zcg+1z+7F8N9WpNl+uvnioxv5GoZwQTMnzAExGQdfKx 0hZCrNnC7ZPHeooLYEOAnT9MhbolSAiI0A1qMvjoqcd6IhB8tHuWRzlB5xvvl9xabk0m fHMVupdSgeIqHVh8sUl+o+bNjF9SiMlRT+Arm97C5JlOBqaTZ06eR2WJJAK1iLoDtTE5 dfBG8DlnNDhabEYk5wu1LwF+fPLhLYze5JZSqFojmjDHnVpSC/eo2zJu6XSoMQ/eyJ2F ZS20J2vzoXzo/8DzKVmFAjK3+7brbSK/dNf3CpDIpVuHzHGb02T6W/x8BzVTPwL1AFNh DsPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=6pXBQdpfBP1oitHnCue+Rvc9vlUAmJZWae0TGJnjbAw=; b=mIuu3zI+YOV6vYz7+anHk/LPQW8xZHGBJeyKJ3YYVeYocC7L0yqqXk0jdaS4aoea1z XRcPU6Rw/R3fJwO1a6EkmL4NWKCP3x0rP6Jw46i8iMyhjg68DG76lfcu3hdZNodIQg5q CNJZ3Op0Y5GSAbzltW+lgyJyMGP2tRRjagZMN9gBkjWGIRo2lE3jxBlegjkwAk1E92rP 6d83tlWmfovTA+lXqj1inyROJPe2J5Aufdtzrl+oAKFqKJDUgBDuEpieX+Xl8CzYvC2Z mlu3kR1pteOtp9v/OrUykJVpaHAQPMvat8vk6Eka29t3lz+QAZ7XhpVspfTFJsT6wJu4 +CLQ== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b29si1423089jav.112.2021.09.09.02.51.49; Thu, 09 Sep 2021 02:52:08 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232630AbhIIJwH (ORCPT + 99 others); Thu, 9 Sep 2021 05:52:07 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:30689 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhIIJwH (ORCPT ); Thu, 9 Sep 2021 05:52:07 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R641e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UnmeS9c_1631181024; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UnmeS9c_1631181024) by smtp.aliyun-inc.com(127.0.0.1); Thu, 09 Sep 2021 17:50:56 +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, chongjiapeng Subject: [PATCH] nvme: Fix missing error code in nvme_configure_directives() Date: Thu, 9 Sep 2021 17:50:21 +0800 Message-Id: <1631181021-108687-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chongjiapeng 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:786 nvme_configure_directives() warn: missing error code 'ret'. Reported-by: Abaci Robot Fixes: f5d118406247 ("nvme: add support for streams and directives") Signed-off-by: chongjiapeng --- 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 7efb31b..84abf1f 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -783,6 +783,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; } -- 1.8.3.1