Static analysis reports that we fail to act on a pwrite() error
initializing the info block to zero.

Cc: Vishal Verma <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
---
 test/libndctl.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/test/libndctl.c b/test/libndctl.c
index e1c8ee9aabf8..9c9263930554 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -1534,6 +1534,7 @@ static int check_btt_autodetect(struct ndctl_bus *bus,
                rc = -ENXIO;
                fprintf(stderr, "%s: failed to overwrite btt on %s\n",
                                devname, bdev);
+               goto out;
        }
        rc = pwrite(fd, buf, 4096, 0);
        if (rc < 4096) {

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to