Skip to contentSkip to conversation

FMC: remove unused integer len and dead assignment

PATCH New Colin King 1 participant 1 message Sep 29, 2015

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 FMC: remove unused integer len and dead assignment

From: Colin Ian King <[email protected]>

static analysis using clang's scan-build detected a dead assignment to len which can be removed.

---
 drivers/fmc/fru-parse.c | 2 --
 1 file changed, 2 deletions(-)
drivers/fmc/fru-parse.c +0 -2
index cb46263..4094146 100644
@@ -31,12 +31,10 @@ static char *__fru_alloc_get_tl(struct fru_common_header *header, int nr)
 {
 	struct fru_type_length *tl;
 	char *res;
-	int len;
 
 	tl = __fru_get_board_tl(header, nr);
 	if (!tl)
 		return NULL;
-	len = fru_strlen(tl);
 	res = fru_alloc(fru_strlen(tl) + 1);
 	if (!res)
 		return NULL;
Signature · 1 line
2.5.0