Messages in this thread Patch in this message | | | From | Jiapeng Chong <> | Subject | [PATCH] nvme: Fix missing error code in nvme_configure_directives() | Date | Thu, 9 Sep 2021 17:50:21 +0800 |
| |
From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
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 <abaci@linux.alibaba.com> Fixes: f5d118406247 ("nvme: add support for streams and directives") Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com> --- 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
| |