From 8a770f9eb7be58439361e0ad30a0c122cd46dc7b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 8 Feb 2020 07:53:10 -0700 Subject: [PATCH] sandbox: p2sb: Silence compiler warning Some compilers produce a warning about 'child' being used before init. Silence this by setting to NULL at the start. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- drivers/misc/p2sb_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c index a6ee9a235e..02f7a7ea67 100644 --- a/drivers/misc/p2sb_emul.c +++ b/drivers/misc/p2sb_emul.c @@ -215,7 +215,7 @@ static int sandbox_p2sb_emul_map_physmem(struct udevice *dev, void **ptrp) { struct p2sb_emul_priv *priv = dev_get_priv(dev); - struct udevice *child; + struct udevice *child = NULL; /* Silence compiler warning */ unsigned int offset; int barnum; int ret; -- 2.25.1