forked from auracaster/openocd
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:
committed by
Antonio Borneo
parent
e4c49d8605
commit
4e23bf155f
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user