[U-Boot] board/BuR/common: incorrect check of dtb

Tom Rini trini at konsulko.com
Fri May 5 16:38:06 UTC 2017


On Wed, May 03, 2017 at 11:44:11PM +0200, xypron.glpk at gmx.de wrote:

> The logical expression to check the dtb is incorrect in
> load_devicetree.
> 
> The problem was indicated by cppcheck.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Reviewed-by: Hannes Schmelzer <oe5hpm at oevsv.at>
> Acked-by: Hannes Schmelzer <oe5hpm at oevsv.at>
> ---
> I do not have a board for testing.
> Please, review carefully.
> ---
>  board/BuR/common/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
> index 876150402c..c0316b9ebd 100644
> --- a/board/BuR/common/common.c
> +++ b/board/BuR/common/common.c
> @@ -265,7 +265,7 @@ static int load_devicetree(void)
>  	char *dtbname = getenv("dtb");
>  	char *dtbdev = getenv("dtbdev");
>  	char *dtppart = getenv("dtbpart");
> -	if (!dtbdev || !dtbdev || !dtbname) {
> +	if (!dtbdev || !dtbpart || !dtbname) {
>  		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
>  		return -1;
>  	}

This breaks some boards such as brppt1_mmc, which I agree doesn't make a
lot of sense with just the above context, can you please test building
'BuR' via buildman?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170505/fc22c8e6/attachment.sig>


More information about the U-Boot mailing list