Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libnvme/src/nvme/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static int nvme_submit_passthru32(struct nvme_transport_handle *hdl,
int err = 0;

user_data = hdl->submit_entry(hdl, cmd);
if (hdl->ctx->dry_run)
if (hdl->ctx && hdl->ctx->dry_run)
goto out;

memcpy(&cmd32, cmd, offsetof(struct linux_passthru_cmd32, result));
Expand Down Expand Up @@ -156,7 +156,7 @@ static int nvme_submit_passthru64(struct nvme_transport_handle *hdl,
int err = 0;

user_data = hdl->submit_entry(hdl, cmd);
if (hdl->ctx->dry_run)
if (hdl->ctx && hdl->ctx->dry_run)
goto out;

do {
Expand Down