[PATCH 44/44] leon, grspw_pkt: fix overwrite protection when more than 32 devs
Daniel Hellstrom
daniel at gaisler.com
Fri Mar 3 14:57:17 UTC 2017
This is a fix for a coverity warning
---
c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
index e44ca56..a3303c3 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
@@ -3093,7 +3093,7 @@ static int grspw2_init3(struct drvmgr_dev *dev)
GRSPW_DBG("GRSPW[%d] on bus %s\n", dev->minor_drv,
dev->parent->dev->name);
- if (grspw_count > GRSPW_MAX)
+ if (grspw_count >= GRSPW_MAX)
return DRVMGR_ENORES;
priv = dev->priv;
--
2.7.4
More information about the devel
mailing list