diff options
Diffstat (limited to 'tools/bpf/bpftool/common.c')
| -rw-r--r-- | tools/bpf/bpftool/common.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c index 897483457bf0..f7261fad45c1 100644 --- a/tools/bpf/bpftool/common.c +++ b/tools/bpf/bpftool/common.c | |||
| @@ -297,10 +297,8 @@ char *get_fdinfo(int fd, const char *key) | |||
| 297 | snprintf(path, sizeof(path), "/proc/self/fdinfo/%d", fd); | 297 | snprintf(path, sizeof(path), "/proc/self/fdinfo/%d", fd); |
| 298 | 298 | ||
| 299 | fdi = fopen(path, "r"); | 299 | fdi = fopen(path, "r"); |
| 300 | if (!fdi) { | 300 | if (!fdi) |
| 301 | p_err("can't open fdinfo: %s", strerror(errno)); | ||
| 302 | return NULL; | 301 | return NULL; |
| 303 | } | ||
| 304 | 302 | ||
| 305 | while ((n = getline(&line, &line_n, fdi)) > 0) { | 303 | while ((n = getline(&line, &line_n, fdi)) > 0) { |
| 306 | char *value; | 304 | char *value; |
| @@ -313,7 +311,6 @@ char *get_fdinfo(int fd, const char *key) | |||
| 313 | 311 | ||
| 314 | value = strchr(line, '\t'); | 312 | value = strchr(line, '\t'); |
| 315 | if (!value || !value[1]) { | 313 | if (!value || !value[1]) { |
| 316 | p_err("malformed fdinfo!?"); | ||
| 317 | free(line); | 314 | free(line); |
| 318 | return NULL; | 315 | return NULL; |
| 319 | } | 316 | } |
| @@ -326,7 +323,6 @@ char *get_fdinfo(int fd, const char *key) | |||
| 326 | return line; | 323 | return line; |
| 327 | } | 324 | } |
| 328 | 325 | ||
| 329 | p_err("key '%s' not found in fdinfo", key); | ||
| 330 | free(line); | 326 | free(line); |
| 331 | fclose(fdi); | 327 | fclose(fdi); |
| 332 | return NULL; | 328 | return NULL; |
