If the variant is not set and therefore NULL, do not attempt to print the variant.
Signed-off-by: Lothar Felten <lothar.fel...@gmail.com> Acked-by: Maxime Ripard <maxime.rip...@bootlin.com> Acked-by: Joe Hershberger <joe.hershber...@ni.com> --- Changelog: new in v4 v4->v5 none --- drivers/net/sun8i_emac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 1f5c630e02..23c4d68f77 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -843,8 +843,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev) priv->variant = dev_get_driver_data(dev); if (!priv->variant) { - printf("%s: Missing variant '%s'\n", __func__, - (char *)priv->variant); + printf("%s: Missing variant\n", __func__); return -EINVAL; } -- 2.14.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot