Minor code bugfix: check right variable.
Via code review by Steve Grubb <[email protected]

Almost innocuous; the specific value is checked later, this
check being wrong would make that check stack garbage.
---
 src/flash/davinci_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/flash/davinci_nand.c
+++ b/src/flash/davinci_nand.c
@@ -663,7 +663,7 @@ static int davinci_nand_device_command(s
        }
 
        aemif = strtoul(argv[4], &ep, 0);
-       if (*ep || chip == 0 || chip == ULONG_MAX) {
+       if (*ep || aemif == 0 || aemif == ULONG_MAX) {
                LOG_ERROR("Invalid AEMIF controller address %s", argv[4]);
                goto fail;
        }
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to