|
@@ -611,7 +611,7 @@ int nvme_get_features(struct nvme_ctrl *dev, unsigned fid, unsigned nsid,
|
|
|
|
|
|
ret = __nvme_submit_sync_cmd(dev->admin_q, &c, &cqe, NULL, 0, 0,
|
|
|
NVME_QID_ANY, 0, 0);
|
|
|
- if (ret >= 0)
|
|
|
+ if (ret >= 0 && result)
|
|
|
*result = le32_to_cpu(cqe.result);
|
|
|
return ret;
|
|
|
}
|
|
@@ -631,7 +631,7 @@ int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword11,
|
|
|
|
|
|
ret = __nvme_submit_sync_cmd(dev->admin_q, &c, &cqe, NULL, 0, 0,
|
|
|
NVME_QID_ANY, 0, 0);
|
|
|
- if (ret >= 0)
|
|
|
+ if (ret >= 0 && result)
|
|
|
*result = le32_to_cpu(cqe.result);
|
|
|
return ret;
|
|
|
}
|