Skip to content

Commit 133424a

Browse files
committed
Merge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus
Pull NVMe fix from Christoph. * 'nvme-4.19' of git://git.infradead.org/nvme: nvme: properly propagate errors in nvme_mpath_init
2 parents 6c76786 + bb830ad commit 133424a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/nvme/host/multipath.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,10 @@ int nvme_mpath_init(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
537537

538538
INIT_WORK(&ctrl->ana_work, nvme_ana_work);
539539
ctrl->ana_log_buf = kmalloc(ctrl->ana_log_size, GFP_KERNEL);
540-
if (!ctrl->ana_log_buf)
540+
if (!ctrl->ana_log_buf) {
541+
error = -ENOMEM;
541542
goto out;
543+
}
542544

543545
error = nvme_read_ana_log(ctrl, true);
544546
if (error)
@@ -547,7 +549,7 @@ int nvme_mpath_init(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
547549
out_free_ana_log_buf:
548550
kfree(ctrl->ana_log_buf);
549551
out:
550-
return -ENOMEM;
552+
return error;
551553
}
552554

553555
void nvme_mpath_uninit(struct nvme_ctrl *ctrl)

0 commit comments

Comments
 (0)