From: Simon Glass Date: Sat, 8 Feb 2020 14:53:10 +0000 (-0700) Subject: sandbox: p2sb: Silence compiler warning X-Git-Tag: v2020.07-rc1~34^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a770f9eb7be58439361e0ad30a0c122cd46dc7b;p=thirdparty%2Fu-boot.git 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 --- diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c index a6ee9a235e3..02f7a7ea675 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;