Skip to content

Commit d559459

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: Return NVMe status in nvme_directive_send_id_endir()"
This reverts commit 2d2d76f. The result field is undefined for many commands and thus can have random values. Thus we can't blindly evaluate these for all commands. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 057f842 commit d559459

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/nvme/ioctl.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,8 +1533,6 @@ int nvme_directive_send_id_endir(int fd, __u32 nsid, bool endir,
15331533
{
15341534
__u32 cdw12 = NVME_SET(dtype, DIRECTIVE_SEND_IDENTIFY_CDW12_DTYPE) |
15351535
NVME_SET(endir, DIRECTIVE_SEND_IDENTIFY_CDW12_ENDIR);
1536-
__u32 result = 0;
1537-
int err;
15381536
struct nvme_directive_send_args args = {
15391537
.args_size = sizeof(args),
15401538
.fd = fd,
@@ -1546,13 +1544,10 @@ int nvme_directive_send_id_endir(int fd, __u32 nsid, bool endir,
15461544
.data_len = sizeof(*id),
15471545
.data = id,
15481546
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
1549-
.result = &result,
1547+
.result = NULL,
15501548
};
15511549

1552-
err = nvme_directive_send(&args);
1553-
if (err && result)
1554-
err = result;
1555-
return err;
1550+
return nvme_directive_send(&args);
15561551
}
15571552

15581553
int nvme_directive_recv(struct nvme_directive_recv_args *args)

0 commit comments

Comments
 (0)