bus/dpaa: fix fd check before close
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 15 Sep 2020 11:57:40 +0000 (19:57 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:11 +0000 (18:55 +0200)
commitc61dc9713666e8c707352ec7d4ec23e4c4d9fdc7
treef5bf749dbc458082d01db3e76d206a10cf481d0c
parent0ff55924712e2a35476c0929235b21d2b77d9f97
bus/dpaa: fix fd check before close

The fd is possibly a negative value while it is passed as an
argument to function "close". Fix the check to the fd.

Fixes: b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/bus/dpaa/base/qbman/qman_driver.c