mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 11:01:33 +00:00
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>
This commit is contained in:
parent
30e71ad5b7
commit
2f15743633
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue