Hi,

-----Original Message-----
From: Huang, Wei <wei.hu...@intel.com> 
Sent: Wednesday, March 17, 2021 4:24 PM
To: dev@dpdk.org; Xu, Rosen <rosen...@intel.com>; Zhang, Qi Z 
<qi.z.zh...@intel.com>
Cc: sta...@dpdk.org; Zhang, Tianfei <tianfei.zh...@intel.com>; Huang, Wei 
<wei.hu...@intel.com>
Subject: [PATCH v1 1/2] raw/ifpga/base: use untained variable as argument

In fme_spi_init(), passing tainted expression "fme->max10_dev"
to function "intel_max10_device_remove" has risk. Untainted variable "max10" 
should be used.

Coverity issue: 367480
Fixes: 96ebfcf8125c ("raw/ifpga/base: add SPI and MAX10 device driver")

Signed-off-by: Wei Huang <wei.hu...@intel.com>
---
 drivers/raw/ifpga/base/ifpga_fme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/base/ifpga_fme.c 
b/drivers/raw/ifpga/base/ifpga_fme.c
index 43c7b9c3dc..a63f90331f 100644
--- a/drivers/raw/ifpga/base/ifpga_fme.c
+++ b/drivers/raw/ifpga/base/ifpga_fme.c
@@ -1001,7 +1001,7 @@ static int fme_spi_init(struct ifpga_feature *feature)
        return ret;
 
 max10_fail:
-       intel_max10_device_remove(fme->max10_dev);
+       intel_max10_device_remove(max10);
 spi_fail:
        altera_spi_release(spi_master);
        return ret;
--
2.29.2

Acked-by: Rosen Xu <rosen...@intel.com>

Reply via email to