]> git.sur5r.net Git - u-boot/commitdiff
board/BuR/common: incorrect check of dtb
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Fri, 5 May 2017 18:57:32 +0000 (20:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 5 May 2017 20:46:51 +0000 (16:46 -0400)
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 <xypron.glpk@gmx.de>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>
board/BuR/common/common.c

index 876150402c8f5fe5d3500555464074d329063c63..5cc82c9473a1a70328299f530ce0c9aecf4b596e 100644 (file)
@@ -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: <dtbdev>/<dtbpart>/<dtb> 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;
        }