DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/nfp: check returned value
@ 2019-04-08 10:38 Alejandro Lucero
  2019-04-08 10:38 ` Alejandro Lucero
  2019-04-08 16:32 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Alejandro Lucero @ 2019-04-08 10:38 UTC (permalink / raw)
  To: dev; +Cc: stable

If the call fails just returns 0.

Coverity issue: 277225
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp_cppcore.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index 2ca4283c4..dec4a8b6d 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -811,8 +811,10 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp)
 
 		/* The PL's PluDeviceID revision code is authoratative */
 		model &= ~0xff;
-		nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
-				   NFP_PL_DEVICE_ID, &tmp);
+		if (nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
+				   NFP_PL_DEVICE_ID, &tmp))
+			return 0;
+
 		model |= (NFP_PL_DEVICE_ID_MASK & tmp) - 0x10;
 	}
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] net/nfp: check returned value
  2019-04-08 10:38 [dpdk-dev] [PATCH] net/nfp: check returned value Alejandro Lucero
@ 2019-04-08 10:38 ` Alejandro Lucero
  2019-04-08 16:32 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Alejandro Lucero @ 2019-04-08 10:38 UTC (permalink / raw)
  To: dev; +Cc: stable

If the call fails just returns 0.

Coverity issue: 277225
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp_cppcore.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index 2ca4283c4..dec4a8b6d 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -811,8 +811,10 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp)
 
 		/* The PL's PluDeviceID revision code is authoratative */
 		model &= ~0xff;
-		nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
-				   NFP_PL_DEVICE_ID, &tmp);
+		if (nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
+				   NFP_PL_DEVICE_ID, &tmp))
+			return 0;
+
 		model |= (NFP_PL_DEVICE_ID_MASK & tmp) - 0x10;
 	}
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check returned value
  2019-04-08 10:38 [dpdk-dev] [PATCH] net/nfp: check returned value Alejandro Lucero
  2019-04-08 10:38 ` Alejandro Lucero
@ 2019-04-08 16:32 ` Ferruh Yigit
  2019-04-08 16:32   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:32 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 11:38 AM, Alejandro Lucero wrote:
> If the call fails just returns 0.
> 
> Coverity issue: 277225
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check returned value
  2019-04-08 16:32 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-04-08 16:32   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:32 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 11:38 AM, Alejandro Lucero wrote:
> If the call fails just returns 0.
> 
> Coverity issue: 277225
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-08 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 10:38 [dpdk-dev] [PATCH] net/nfp: check returned value Alejandro Lucero
2019-04-08 10:38 ` Alejandro Lucero
2019-04-08 16:32 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-08 16:32   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).