From: Eric Curtin Date: Wed, 10 Feb 2021 18:32:01 +0000 (+0000) Subject: Don't print error on failed to open in nvme-topology.c X-Git-Tag: v1.14~103 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c570b7774ff452a43442c9779ad9819f722f93f;p=users%2Fsagi%2Fnvme-cli.git Don't print error on failed to open in nvme-topology.c Sometimes opens are intentionally attempted and allowed fail, such as the "nvme list" command. --- diff --git a/nvme-topology.c b/nvme-topology.c index 436926b1..c0e2d510 100644 --- a/nvme-topology.c +++ b/nvme-topology.c @@ -60,10 +60,8 @@ char *nvme_get_ctrl_attr(char *path, const char *attr) goto err_free_path; fd = open(attrpath, O_RDONLY); - if (fd < 0) { - fprintf(stderr, "Failed to open %s: %s\n", attrpath, strerror(errno)); + if (fd < 0) goto err_free_value; - } ret = read(fd, value, 1024); if (ret < 0) {