[03/12] libflash/libflash: Remove logicially dead code (CID 97821)

Message ID 20170803064551.3439-3-cyril.bur@au1.ibm.com
State Accepted
Headers show

Commit Message

Cyril Bur Aug. 3, 2017, 6:45 a.m.
libflash/libflash.c:
line 369: chunk = 0x100 - (d & 0xff);
line 370: if (chunk > 0x100)
   At condition chunk > 256U, the value of chunk must be between 1 and 256.

Fixes CID 97821

Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 libflash/libflash.c | 2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/libflash/libflash.c b/libflash/libflash.c
index 9bdc7d6f..38f87b86 100644
--- a/libflash/libflash.c
+++ b/libflash/libflash.c
@@ -367,8 +367,6 @@  static int flash_write(struct blocklevel_device *bl, uint32_t dst, const void *s
 
 		/* Handle misaligned start */
 		chunk = 0x100 - (d & 0xff);
-		if (chunk > 0x100)
-			chunk = 0x100;
 		if (chunk > todo)
 			chunk = todo;