[Skiboot] [PATCH 03/12] libflash/libflash: Remove logicially dead code (CID 97821)
Cyril Bur
cyril.bur at au1.ibm.com
Thu Aug 3 16:45:42 AEST 2017
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 at au1.ibm.com>
---
libflash/libflash.c | 2 --
1 file changed, 2 deletions(-)
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;
--
2.13.3
More information about the Skiboot
mailing list