提交 18eddaed 编写于 作者: W Wei Yongjun 提交者: Tejun Heo

mvsas: fix error return code in mvs_task_prep()

Fix to return error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 0ce57f8a
...@@ -791,8 +791,10 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf ...@@ -791,8 +791,10 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
slot->slot_tag = tag; slot->slot_tag = tag;
slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); slot->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
if (!slot->buf) if (!slot->buf) {
rc = -ENOMEM;
goto err_out_tag; goto err_out_tag;
}
memset(slot->buf, 0, MVS_SLOT_BUF_SZ); memset(slot->buf, 0, MVS_SLOT_BUF_SZ);
tei.task = task; tei.task = task;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册