net/tap: fix file descriptor check
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 6 Nov 2018 19:30:05 +0000 (11:30 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Nov 2018 01:14:12 +0000 (02:14 +0100)
commite0a10f4691c2fa74d228a1c21772456afef1e060
tree0976503b0e4b5df65134023bcceebd4532435e95
parentcc02c977189c46f0fa7de4e25f5f79c9a92cd052
net/tap: fix file descriptor check

Static analysis tools don't like the fact that fd could be zero
in the error path. This won't happen in real world because
stdin would have to be closed, then other error occurring.

Coverity issue: 14079
Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c