Remove dead code, and print better return for other errors.
>>> CID 120411: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "return;".
Fixes:
bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Remy Horton <remy.horton@intel.com>
return;
}
}
- if (stat == 0)
- return;
- else if (stat == -ENOTSUP)
- printf("Port %i: Operation not supported\n", params->port);
- else
- printf("Port %i: Error %i\n", params->port, stat);
+
+ printf("Port %i: Error %s\n", params->port,
+ strerror(-stat));
}
static void