|
|
@@ -101,10 +101,8 @@ static struct drm_encoder *panel_encoder_create(struct drm_device *dev,
|
|
|
|
|
|
panel_encoder = devm_kzalloc(dev->dev, sizeof(*panel_encoder),
|
|
|
GFP_KERNEL);
|
|
|
- if (!panel_encoder) {
|
|
|
- dev_err(dev->dev, "allocation failed\n");
|
|
|
+ if (!panel_encoder)
|
|
|
return NULL;
|
|
|
- }
|
|
|
|
|
|
panel_encoder->mod = mod;
|
|
|
|
|
|
@@ -210,10 +208,8 @@ static struct drm_connector *panel_connector_create(struct drm_device *dev,
|
|
|
|
|
|
panel_connector = devm_kzalloc(dev->dev, sizeof(*panel_connector),
|
|
|
GFP_KERNEL);
|
|
|
- if (!panel_connector) {
|
|
|
- dev_err(dev->dev, "allocation failed\n");
|
|
|
+ if (!panel_connector)
|
|
|
return NULL;
|
|
|
- }
|
|
|
|
|
|
panel_connector->encoder = encoder;
|
|
|
panel_connector->mod = mod;
|
|
|
@@ -293,11 +289,8 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
|
|
|
}
|
|
|
|
|
|
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
|
|
- if (!info) {
|
|
|
- pr_err("%s: allocation failed\n", __func__);
|
|
|
- of_node_put(info_np);
|
|
|
- return NULL;
|
|
|
- }
|
|
|
+ if (!info)
|
|
|
+ goto put_node;
|
|
|
|
|
|
ret |= of_property_read_u32(info_np, "ac-bias", &info->ac_bias);
|
|
|
ret |= of_property_read_u32(info_np, "ac-bias-intrpt", &info->ac_bias_intrpt);
|
|
|
@@ -316,11 +309,11 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
|
|
|
if (ret) {
|
|
|
pr_err("%s: error reading panel-info properties\n", __func__);
|
|
|
kfree(info);
|
|
|
- of_node_put(info_np);
|
|
|
- return NULL;
|
|
|
+ info = NULL;
|
|
|
}
|
|
|
- of_node_put(info_np);
|
|
|
|
|
|
+put_node:
|
|
|
+ of_node_put(info_np);
|
|
|
return info;
|
|
|
}
|
|
|
|
|
|
@@ -428,7 +421,7 @@ struct platform_driver panel_driver = {
|
|
|
.remove = panel_remove,
|
|
|
.driver = {
|
|
|
.owner = THIS_MODULE,
|
|
|
- .name = "panel",
|
|
|
+ .name = "tilcdc-panel",
|
|
|
.of_match_table = panel_of_match,
|
|
|
},
|
|
|
};
|