projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce57f8
)
mvsas: fix error return code in mvs_task_prep()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Mon, 31 Oct 2016 15:04:10 +0000
(15:04 +0000)
committer
Tejun Heo
<tj@kernel.org>
Mon, 31 Oct 2016 16:28:08 +0000
(10:28 -0600)
Fix to return error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/scsi/mvsas/mv_sas.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/mvsas/mv_sas.c
b/drivers/scsi/mvsas/mv_sas.c
index 86eb19902bacef9f62e808833cbe86387b1d1771..c7cc8035eacb371eb3ae6e038abb6df7c94e7169 100644
(file)
--- a/
drivers/scsi/mvsas/mv_sas.c
+++ b/
drivers/scsi/mvsas/mv_sas.c
@@
-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->buf = pci_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
- if (!slot->buf)
+ if (!slot->buf) {
+ rc = -ENOMEM;
goto err_out_tag;
+ }
memset(slot->buf, 0, MVS_SLOT_BUF_SZ);
tei.task = task;