From: Colin Ian King <colin.k...@canonical.com>

The call to fru_strlen on tl is performed twice; remove the duplicate
and the unsed variable len. This fixes the clang warning:

drivers/fmc/fru-parse.c:39:2: warning: Value stored to 'len' is never read

Signed-off-by: Colin Ian King <colin.k...@canonical.com>
---
 drivers/fmc/fru-parse.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/fmc/fru-parse.c b/drivers/fmc/fru-parse.c
index cb46263..4094146 100644
--- a/drivers/fmc/fru-parse.c
+++ b/drivers/fmc/fru-parse.c
@@ -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;
-- 
2.8.1

Reply via email to