]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: sun8i-emac: fix printing NULL character
authorLothar Felten <lothar.felten@gmail.com>
Fri, 13 Jul 2018 08:45:26 +0000 (10:45 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 16 Jul 2018 06:57:27 +0000 (12:27 +0530)
If the variant is not set and therefore NULL, do not attempt to print
the variant.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@openedev.com>
drivers/net/sun8i_emac.c

index 1f5c630e0232f9faaca3d481087338888bd7708a..23c4d68f778849fd8112b5fed221f8a687dbc89c 100644 (file)
@@ -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;
        }