summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMichael Brandt <michael.brandt@stericsson.com>2010-11-10 16:27:37 +0100
committerMichael BRANDT <michael.brandt@stericsson.com>2010-11-17 16:48:16 +0100
commitbd39552e0f4d7303f04fc7cae77b8b412e1a45db (patch)
tree0aa0c548e6cee45aa1ef02b08022deea04281e3e /board
parent20d04c7b94e36882fc744034892c6e5ef2d5301e (diff)
U8500: crashdump: check find_mmc_device() return code
Fixed: Dereferencing possibly NULL "mmc" in call to function "mmc_init" ST-Ericsson ID: 273353 Change-Id: Ie75546c9e26b638d7cd7fe122a1180418b48df14 Signed-off-by: Michael Brandt <michael.brandt@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/8367 Reviewed-by: Mikael LARSSON1 <mikael.xt.larsson@stericsson.com>
Diffstat (limited to 'board')
-rw-r--r--board/st/u8500/cmd_cdump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/st/u8500/cmd_cdump.c b/board/st/u8500/cmd_cdump.c
index 9b203ab83..87ae2a793 100644
--- a/board/st/u8500/cmd_cdump.c
+++ b/board/st/u8500/cmd_cdump.c
@@ -251,6 +251,10 @@ static int wait_for_mmc(void)
struct mmc *mmc;
mmc = find_mmc_device(CONFIG_MMC_DEV_NUM);
+ if (!mmc) {
+ printf("MMC device %d not found\n", CONFIG_MMC_DEV_NUM);
+ return 1;
+ }
while (mmc_init(mmc) != 0) {
printf("Insert MMC/SD card or press ctrl-c to abort\n");
putc('.');