Skip to content

Commit bd7a6a0

Browse files
committed
nvme: init result_def in get_feature_id_changed
The CI build fails because the compiler complains about result_def not initialized and might be used unititialid. The same problem was with err_def, thus use the same approach and just initialize always. Signed-off-by: Daniel Wagner <wagi@kernel.org>
1 parent 26d1137 commit bd7a6a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nvme.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4859,12 +4859,12 @@ static bool is_get_feature_result_set(enum nvme_features_id feature_id)
48594859
static int get_feature_id_changed(struct nvme_transport_handle *hdl, struct feat_cfg cfg,
48604860
nvme_print_flags_t flags)
48614861
{
4862-
int err;
4863-
int err_def = 0;
4864-
__u64 result;
4865-
__u64 result_def;
4866-
_cleanup_free_ void *buf = NULL;
48674862
_cleanup_free_ void *buf_def = NULL;
4863+
_cleanup_free_ void *buf = NULL;
4864+
__u64 result_def = 0;
4865+
__u64 result;
4866+
int err_def = 0;
4867+
int err;
48684868

48694869
if (cfg.changed)
48704870
cfg.sel = NVME_GET_FEATURES_SEL_CURRENT;

0 commit comments

Comments
 (0)