leon, grspw_pkt: fix overwrite protection when more than 32 devs

This is a fix for a coverity warning
This commit is contained in:
Daniel Hellstrom
2017-02-03 08:55:27 +01:00
parent cc8a50ab5c
commit 49caf22226

View File

@@ -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;