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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index a6ee9a2..02f7a7e 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -215,7 +215,7 @@
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;