From bc3f39ea0d3c9339b7f09b1d766b6a62e1921033 Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Tue, 27 Oct 2015 13:07:54 +0100
Subject: samsung: board/misc: check returned pointer for get_board_type()
calls
The function get_board_type() is called in two places by common code,
but the returned pointer was never check.
This commit adds checking the returned pointer, before use it.
Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Reviewed-by: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang
---
board/samsung/common/board.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'board/samsung/common/board.c')
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index d32c75de50..1334c22ddd 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -304,8 +304,8 @@ int checkboard(void)
printf("Board: %s\n", board_info ? board_info : "unknown");
#ifdef CONFIG_BOARD_TYPES
board_info = get_board_type();
-
- printf("Model: %s\n", board_info ? board_info : "unknown");
+ if (board_info)
+ printf("Type: %s\n", board_info);
#endif
return 0;
}
--
cgit