From: Lothar Felten Date: Fri, 13 Jul 2018 08:45:26 +0000 (+0200) Subject: net: sun8i-emac: fix printing NULL character X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=2f157436335a5507bfeda8097e3f687a31e941ce;p=u-boot.git net: sun8i-emac: fix printing NULL character If the variant is not set and therefore NULL, do not attempt to print the variant. Signed-off-by: Lothar Felten Acked-by: Maxime Ripard Acked-by: Joe Hershberger Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- 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; }