raw/ifpga/base: check null pointer
authorWei Huang <wei.huang@intel.com>
Wed, 17 Mar 2021 08:21:36 +0000 (04:21 -0400)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 1 Apr 2021 11:52:35 +0000 (13:52 +0200)
commit20077edf5f09961c7b4434bdd4d48c4353d65507
treee3004049b6c3a18029695bd5a1eb24a175923a60
parentbf95921a01acc341442cb42c4764c05334e4412b
raw/ifpga/base: check null pointer

In init_sec_mgr(), pointer "hw" may be NULL, so "hw" should
be checked before dereferencing.

Coverity issue: 367483
Fixes: a05bd1b40bde ("raw/ifpga: add FPGA RSU APIs")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
drivers/raw/ifpga/base/ifpga_sec_mgr.c