From: Randy Date: Fri, 20 Mar 2020 15:58:50 +0000 (-0500) Subject: PT-4572 - fix incorrect logic X-Git-Tag: v1.11~8^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b7e41e5d8f4f6282ed33e4463a67884579f6878e;p=users%2Fhch%2Fnvme-cli.git PT-4572 - fix incorrect logic test for enabled was incorrect in wdc_do_cap_telemetry_log --- diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c index 458e87c..280f9fa 100644 --- a/plugins/wdc/wdc-nvme.c +++ b/plugins/wdc/wdc-nvme.c @@ -1411,7 +1411,8 @@ static int wdc_do_cap_telemetry_log(int fd, char *file, __u32 bs, int type, int err = nvme_get_feature(fd, 0, WDC_VU_DISABLE_CNTLR_TELEMETRY_OPTION_FEATURE_ID, 0, 0, 4, buf, &result); if (err == 0) { - if (result) { + if (result == 0) { + /* enabled */ host_gen = 0; ctrl_init = 1; }