raw/ifpga/base: check address before assigning
authorWei Huang <wei.huang@intel.com>
Mon, 31 May 2021 05:22:31 +0000 (01:22 -0400)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 10 Jun 2021 10:04:16 +0000 (12:04 +0200)
commit92a3b62b0b5dc5be1b3edbe5b7898c2982643339
treeed42009ebf26de8dc8e46387a6448753fe6b9236
parent8ce5678f28a80871c9f4ef41ef52ba206ef5a17f
raw/ifpga/base: check address before assigning

In max10_staging_area_init(), variable "start" from fdt_get_reg() may
be invalid, it should be checked before assigning to member variable
"staging_area_base" of structure "intel_max10_device".

Coverity issue: 367480, 367482
Fixes: a05bd1b40bde ("raw/ifpga: add FPGA RSU APIs")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
drivers/raw/ifpga/base/opae_intel_max10.c
drivers/raw/ifpga/base/opae_intel_max10.h