Patchwork mtd: bcm47xxpart: fix off by one in partitions limit

login
register
mail settings
Submitter Rafał Miłecki
Date Feb. 26, 2014, 12:57 p.m.
Message ID <1393419440-26400-1-git-send-email-zajec5@gmail.com>
Download mbox | patch
Permalink /patch/324382/
State Accepted
Headers show

Comments

Rafał Miłecki - Feb. 26, 2014, 12:57 p.m.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/mtd/bcm47xxpart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
index de1eb92..88802a8 100644
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -91,7 +91,7 @@  static int bcm47xxpart_parse(struct mtd_info *master,
 		if (offset >= 0x2000000)
 			break;
 
-		if (curr_part > BCM47XXPART_MAX_PARTS) {
+		if (curr_part >= BCM47XXPART_MAX_PARTS) {
 			pr_warn("Reached maximum number of partitions, scanning stopped!\n");
 			break;
 		}