Skip to content

Commit 9151ad0

Browse files
committed
libnvme/mi: always initialize timeout_save
The compiler is not able to track the lifetime of the variable correctly and fails sometimes to compile because it thinks the variable is not properly initialized when used. Signed-off-by: Daniel Wagner <[email protected]>
1 parent e7c4c28 commit 9151ad0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • libnvme/src/nvme

libnvme/src/nvme/mi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ int nvme_mi_admin_admin_passthru(struct nvme_transport_handle *hdl, __u8 opcode,
874874
struct nvme_mi_admin_req_hdr req_hdr;
875875
struct nvme_mi_resp resp;
876876
struct nvme_mi_req req;
877-
unsigned int timeout_save;
877+
unsigned int timeout_save = 0;
878878
int rc;
879879
int direction = opcode & 0x3;
880880
bool has_write_data = false;

0 commit comments

Comments
 (0)