summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLothar Felten <lothar.felten@gmail.com>2018-07-13 10:45:26 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-07-16 12:27:27 +0530
commit2f157436335a5507bfeda8097e3f687a31e941ce (patch)
tree9b60ff4b7615f0ed80ae2350c310199ffc01f85c /drivers/net
parent30e71ad5b7117d17b547aa39b9d17cf4706f629a (diff)
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 <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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sun8i_emac.c3
1 files changed, 1 insertions, 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;
}