Using access followed by open causes a static analysis warning
about Time of check versus Time of use. Also, access() and
open() have different UID permission checks.
This is not a serious problem; but easy to fix by using errno instead.
Coverity issue: 300870
Fixes: 4a928ef9f611 ("bus/pci: enable write combining during mapping") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: David Marchand <david.marchand@redhat.com>