[Skiboot] [PATCH] flash-subpartition: fix spurious non-NULL check of non-NULL variable

Stewart Smith stewart at linux.vnet.ibm.com
Wed Oct 26 18:06:21 AEDT 2016


In flash_subpart_info, part_actual can't be NULL (we bail out if so),
so this spurious check just manages to trigger warning in static
analysis.

Fixes: 8652ced003f7977e1126149b8011c184b88fe24e
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 core/flash-subpartition.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/core/flash-subpartition.c b/core/flash-subpartition.c
index 1e91c1bd06e6..0de7b4e0058b 100644
--- a/core/flash-subpartition.c
+++ b/core/flash-subpartition.c
@@ -106,8 +106,6 @@ int flash_subpart_info(void *part_header, uint32_t header_len,
 				*offset += o;
 			if (size)
 				*size = s;
-			if (!part_actual)
-				return OPAL_SUCCESS;
 			subpart_found = true;
 		}
 		toc += sizeof(struct flash_hostboot_toc);
-- 
2.1.4



More information about the Skiboot mailing list