]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/bcm47xxpart.c
Merge tag 'ux500-fix-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / drivers / mtd / bcm47xxpart.c
index 377947580203d295553029097607964ec850551c..283ff7e17a0febd24de519fdd1991ce351d214e7 100644 (file)
@@ -229,12 +229,10 @@ static int bcm47xxpart_parse(struct mtd_info *master,
 
                        last_trx_part = curr_part - 1;
 
-                       /*
-                        * We have whole TRX scanned, skip to the next part. Use
-                        * roundown (not roundup), as the loop will increase
-                        * offset in next step.
-                        */
-                       offset = rounddown(offset + trx->length, blocksize);
+                       /* Jump to the end of TRX */
+                       offset = roundup(offset + trx->length, blocksize);
+                       /* Next loop iteration will increase the offset */
+                       offset -= blocksize;
                        continue;
                }