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>
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;
}