From: xypron.glpk@gmx.de Date: Fri, 5 May 2017 18:57:32 +0000 (+0200) Subject: board/BuR/common: incorrect check of dtb X-Git-Tag: v2017.05~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=169b50efe2635952d9679268860a3e37aa13adf6;p=u-boot board/BuR/common: incorrect check of dtb The logical expression to check the dtb is incorrect in load_devicetree. The problem was indicated by cppcheck. The inconsistent variable name dtppart is changed to dtbpart. Signed-off-by: Heinrich Schuchardt Reviewed-by: Hannes Schmelzer Acked-by: Hannes Schmelzer --- diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 876150402c..5cc82c9473 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -264,13 +264,13 @@ static int load_devicetree(void) #else char *dtbname = getenv("dtb"); char *dtbdev = getenv("dtbdev"); - char *dtppart = getenv("dtbpart"); - if (!dtbdev || !dtbdev || !dtbname) { + char *dtbpart = getenv("dtbpart"); + if (!dtbdev || !dtbpart || !dtbname) { printf("%s: // missing.\n", __func__); return -1; } - if (fs_set_blk_dev(dtbdev, dtppart, FS_TYPE_EXT)) { + if (fs_set_blk_dev(dtbdev, dtbpart, FS_TYPE_EXT)) { puts("load_devicetree: set_blk_dev failed.\n"); return -1; }