flash/nand/core: remove redundant NULL check

The value p can never be NULL here.
Found by cppcheck.

Change-Id: I2947b46e714c365021a945705f71d099168d30f4
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9496
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Mark O'Donovan
2026-02-24 20:32:02 +00:00
committed by Antonio Borneo
parent e4c49d8605
commit 4e23bf155f

View File

@@ -21,7 +21,7 @@ void nand_device_add(struct nand_device *c)
{ {
if (nand_devices) { if (nand_devices) {
struct nand_device *p = nand_devices; struct nand_device *p = nand_devices;
while (p && p->next) while (p->next)
p = p->next; p = p->next;
p->next = c; p->next = c;
} else } else