Commit 169b50efe2635952d9679268860a3e37aa13adf6
Committed by
Tom Rini
1 parent
f59a3b21f6
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
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 <xypron.glpk@gmx.de> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
board/BuR/common/common.c
... | ... | @@ -264,13 +264,13 @@ |
264 | 264 | #else |
265 | 265 | char *dtbname = getenv("dtb"); |
266 | 266 | char *dtbdev = getenv("dtbdev"); |
267 | - char *dtppart = getenv("dtbpart"); | |
268 | - if (!dtbdev || !dtbdev || !dtbname) { | |
267 | + char *dtbpart = getenv("dtbpart"); | |
268 | + if (!dtbdev || !dtbpart || !dtbname) { | |
269 | 269 | printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__); |
270 | 270 | return -1; |
271 | 271 | } |
272 | 272 | |
273 | - if (fs_set_blk_dev(dtbdev, dtppart, FS_TYPE_EXT)) { | |
273 | + if (fs_set_blk_dev(dtbdev, dtbpart, FS_TYPE_EXT)) { | |
274 | 274 | puts("load_devicetree: set_blk_dev failed.\n"); |
275 | 275 | return -1; |
276 | 276 | } |