Commit 3366ba38 authored by Markus Elfring's avatar Markus Elfring Committed by Jyri Sarha

drm/tilcdc: Delete an error message for a failed memory allocation in seven functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
parent 8bb5b222
...@@ -994,10 +994,8 @@ int tilcdc_crtc_create(struct drm_device *dev) ...@@ -994,10 +994,8 @@ int tilcdc_crtc_create(struct drm_device *dev)
int ret; int ret;
tilcdc_crtc = devm_kzalloc(dev->dev, sizeof(*tilcdc_crtc), GFP_KERNEL); tilcdc_crtc = devm_kzalloc(dev->dev, sizeof(*tilcdc_crtc), GFP_KERNEL);
if (!tilcdc_crtc) { if (!tilcdc_crtc)
dev_err(dev->dev, "allocation failed\n");
return -ENOMEM; return -ENOMEM;
}
init_completion(&tilcdc_crtc->palette_loaded); init_completion(&tilcdc_crtc->palette_loaded);
tilcdc_crtc->palette_base = dmam_alloc_coherent(dev->dev, tilcdc_crtc->palette_base = dmam_alloc_coherent(dev->dev,
......
...@@ -233,10 +233,8 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) ...@@ -233,10 +233,8 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev)
int ret; int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) { if (!priv)
dev_err(dev, "failed to allocate private data\n");
return -ENOMEM; return -ENOMEM;
}
ddev = drm_dev_alloc(ddrv, dev); ddev = drm_dev_alloc(ddrv, dev);
if (IS_ERR(ddev)) if (IS_ERR(ddev))
......
...@@ -101,10 +101,8 @@ static struct drm_encoder *panel_encoder_create(struct drm_device *dev, ...@@ -101,10 +101,8 @@ static struct drm_encoder *panel_encoder_create(struct drm_device *dev,
panel_encoder = devm_kzalloc(dev->dev, sizeof(*panel_encoder), panel_encoder = devm_kzalloc(dev->dev, sizeof(*panel_encoder),
GFP_KERNEL); GFP_KERNEL);
if (!panel_encoder) { if (!panel_encoder)
dev_err(dev->dev, "allocation failed\n");
return NULL; return NULL;
}
panel_encoder->mod = mod; panel_encoder->mod = mod;
...@@ -210,10 +208,8 @@ static struct drm_connector *panel_connector_create(struct drm_device *dev, ...@@ -210,10 +208,8 @@ static struct drm_connector *panel_connector_create(struct drm_device *dev,
panel_connector = devm_kzalloc(dev->dev, sizeof(*panel_connector), panel_connector = devm_kzalloc(dev->dev, sizeof(*panel_connector),
GFP_KERNEL); GFP_KERNEL);
if (!panel_connector) { if (!panel_connector)
dev_err(dev->dev, "allocation failed\n");
return NULL; return NULL;
}
panel_connector->encoder = encoder; panel_connector->encoder = encoder;
panel_connector->mod = mod; panel_connector->mod = mod;
...@@ -294,7 +290,6 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np) ...@@ -294,7 +290,6 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np)
info = kzalloc(sizeof(*info), GFP_KERNEL); info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) { if (!info) {
pr_err("%s: allocation failed\n", __func__);
of_node_put(info_np); of_node_put(info_np);
return NULL; return NULL;
} }
......
...@@ -111,10 +111,8 @@ static struct drm_encoder *tfp410_encoder_create(struct drm_device *dev, ...@@ -111,10 +111,8 @@ static struct drm_encoder *tfp410_encoder_create(struct drm_device *dev,
tfp410_encoder = devm_kzalloc(dev->dev, sizeof(*tfp410_encoder), tfp410_encoder = devm_kzalloc(dev->dev, sizeof(*tfp410_encoder),
GFP_KERNEL); GFP_KERNEL);
if (!tfp410_encoder) { if (!tfp410_encoder)
dev_err(dev->dev, "allocation failed\n");
return NULL; return NULL;
}
tfp410_encoder->dpms = DRM_MODE_DPMS_OFF; tfp410_encoder->dpms = DRM_MODE_DPMS_OFF;
tfp410_encoder->mod = mod; tfp410_encoder->mod = mod;
...@@ -224,10 +222,8 @@ static struct drm_connector *tfp410_connector_create(struct drm_device *dev, ...@@ -224,10 +222,8 @@ static struct drm_connector *tfp410_connector_create(struct drm_device *dev,
tfp410_connector = devm_kzalloc(dev->dev, sizeof(*tfp410_connector), tfp410_connector = devm_kzalloc(dev->dev, sizeof(*tfp410_connector),
GFP_KERNEL); GFP_KERNEL);
if (!tfp410_connector) { if (!tfp410_connector)
dev_err(dev->dev, "allocation failed\n");
return NULL; return NULL;
}
tfp410_connector->encoder = encoder; tfp410_connector->encoder = encoder;
tfp410_connector->mod = mod; tfp410_connector->mod = mod;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment