diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2017-02-03 08:55:27 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2017-03-06 07:54:55 +0100 |
commit | 49caf2222636df5166ff7033bec1054b9b3885ce (patch) | |
tree | 5e723190bd4de90c14c906136edafa92fb7d29a5 | |
parent | leon,grtm: ioctl() shouldn't access pointer before validated (diff) | |
download | rtems-49caf2222636df5166ff7033bec1054b9b3885ce.tar.bz2 |
leon, grspw_pkt: fix overwrite protection when more than 32 devs
This is a fix for a coverity warning
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 e1568a1849..b7b3624588 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; |