Skip to content

Commit caa68d8

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 d163921 commit caa68d8

File tree

1 file changed

+1
-1
lines changed
  • libnvme/src/nvme

1 file changed

+1
-1
lines changed

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)