diff options
| -rw-r--r-- | drivers/nvme/host/multipath.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 5a9562881d4e..9fe3fff818b8 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c | |||
| @@ -537,8 +537,10 @@ int nvme_mpath_init(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | |||
| 537 | 537 | ||
| 538 | INIT_WORK(&ctrl->ana_work, nvme_ana_work); | 538 | INIT_WORK(&ctrl->ana_work, nvme_ana_work); |
| 539 | ctrl->ana_log_buf = kmalloc(ctrl->ana_log_size, GFP_KERNEL); | 539 | 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; | ||
| 541 | goto out; | 542 | goto out; |
| 543 | } | ||
| 542 | 544 | ||
| 543 | error = nvme_read_ana_log(ctrl, true); | 545 | error = nvme_read_ana_log(ctrl, true); |
| 544 | if (error) | 546 | if (error) |
| @@ -547,7 +549,7 @@ int nvme_mpath_init(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | |||
| 547 | out_free_ana_log_buf: | 549 | out_free_ana_log_buf: |
| 548 | kfree(ctrl->ana_log_buf); | 550 | kfree(ctrl->ana_log_buf); |
| 549 | out: | 551 | out: |
| 550 | return -ENOMEM; | 552 | return error; |
| 551 | } | 553 | } |
| 552 | 554 | ||
| 553 | void nvme_mpath_uninit(struct nvme_ctrl *ctrl) | 555 | void nvme_mpath_uninit(struct nvme_ctrl *ctrl) |
