提交 38bb5253 编写于 作者: S Sachin Kamat 提交者: Inki Dae

drm/exynos: Remove redundant error messages

kzalloc already has built-in error messages. Hence remove
additional ones.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NInki Dae <inki.dae@samsung.com>
上级 3f1c781d
...@@ -149,10 +149,8 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev, ...@@ -149,10 +149,8 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev,
DRM_DEBUG_KMS("desired size = 0x%x\n", size); DRM_DEBUG_KMS("desired size = 0x%x\n", size);
buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
if (!buffer) { if (!buffer)
DRM_ERROR("failed to allocate exynos_drm_gem_buf.\n");
return NULL; return NULL;
}
buffer->size = size; buffer->size = size;
return buffer; return buffer;
......
...@@ -279,10 +279,8 @@ struct drm_connector *exynos_drm_connector_create(struct drm_device *dev, ...@@ -279,10 +279,8 @@ struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
int err; int err;
exynos_connector = kzalloc(sizeof(*exynos_connector), GFP_KERNEL); exynos_connector = kzalloc(sizeof(*exynos_connector), GFP_KERNEL);
if (!exynos_connector) { if (!exynos_connector)
DRM_ERROR("failed to allocate connector\n");
return NULL; return NULL;
}
connector = &exynos_connector->drm_connector; connector = &exynos_connector->drm_connector;
......
...@@ -325,10 +325,8 @@ int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr) ...@@ -325,10 +325,8 @@ int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr)
struct drm_crtc *crtc; struct drm_crtc *crtc;
exynos_crtc = kzalloc(sizeof(*exynos_crtc), GFP_KERNEL); exynos_crtc = kzalloc(sizeof(*exynos_crtc), GFP_KERNEL);
if (!exynos_crtc) { if (!exynos_crtc)
DRM_ERROR("failed to allocate exynos crtc\n");
return -ENOMEM; return -ENOMEM;
}
exynos_crtc->pipe = nr; exynos_crtc->pipe = nr;
exynos_crtc->dpms = DRM_MODE_DPMS_OFF; exynos_crtc->dpms = DRM_MODE_DPMS_OFF;
......
...@@ -231,7 +231,6 @@ struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, ...@@ -231,7 +231,6 @@ struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev,
buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
if (!buffer) { if (!buffer) {
DRM_ERROR("failed to allocate exynos_drm_gem_buf.\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_unmap_attach; goto err_unmap_attach;
} }
......
...@@ -47,10 +47,8 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) ...@@ -47,10 +47,8 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
int nr; int nr;
private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL); private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL);
if (!private) { if (!private)
DRM_ERROR("failed to allocate private\n");
return -ENOMEM; return -ENOMEM;
}
INIT_LIST_HEAD(&private->pageflip_event_list); INIT_LIST_HEAD(&private->pageflip_event_list);
dev->dev_private = (void *)private; dev->dev_private = (void *)private;
......
...@@ -324,10 +324,8 @@ exynos_drm_encoder_create(struct drm_device *dev, ...@@ -324,10 +324,8 @@ exynos_drm_encoder_create(struct drm_device *dev,
return NULL; return NULL;
exynos_encoder = kzalloc(sizeof(*exynos_encoder), GFP_KERNEL); exynos_encoder = kzalloc(sizeof(*exynos_encoder), GFP_KERNEL);
if (!exynos_encoder) { if (!exynos_encoder)
DRM_ERROR("failed to allocate encoder\n");
return NULL; return NULL;
}
exynos_encoder->dpms = DRM_MODE_DPMS_OFF; exynos_encoder->dpms = DRM_MODE_DPMS_OFF;
exynos_encoder->manager = manager; exynos_encoder->manager = manager;
......
...@@ -156,10 +156,8 @@ exynos_drm_framebuffer_init(struct drm_device *dev, ...@@ -156,10 +156,8 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
} }
exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL); exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL);
if (!exynos_fb) { if (!exynos_fb)
DRM_ERROR("failed to allocate exynos drm framebuffer\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd); drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd);
exynos_fb->exynos_gem_obj[0] = exynos_gem_obj; exynos_fb->exynos_gem_obj[0] = exynos_gem_obj;
...@@ -220,10 +218,8 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, ...@@ -220,10 +218,8 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
int i, ret; int i, ret;
exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL); exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL);
if (!exynos_fb) { if (!exynos_fb)
DRM_ERROR("failed to allocate exynos drm framebuffer\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
if (!obj) { if (!obj) {
......
...@@ -248,10 +248,8 @@ int exynos_drm_fbdev_init(struct drm_device *dev) ...@@ -248,10 +248,8 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
return 0; return 0;
fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
if (!fbdev) { if (!fbdev)
DRM_ERROR("failed to allocate drm fbdev.\n");
return -ENOMEM; return -ENOMEM;
}
private->fb_helper = helper = &fbdev->drm_fb_helper; private->fb_helper = helper = &fbdev->drm_fb_helper;
helper->funcs = &exynos_drm_fb_helper_funcs; helper->funcs = &exynos_drm_fb_helper_funcs;
......
...@@ -1345,10 +1345,8 @@ static int fimc_init_prop_list(struct exynos_drm_ippdrv *ippdrv) ...@@ -1345,10 +1345,8 @@ static int fimc_init_prop_list(struct exynos_drm_ippdrv *ippdrv)
struct drm_exynos_ipp_prop_list *prop_list; struct drm_exynos_ipp_prop_list *prop_list;
prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL); prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL);
if (!prop_list) { if (!prop_list)
DRM_ERROR("failed to alloc property list.\n");
return -ENOMEM; return -ENOMEM;
}
prop_list->version = 1; prop_list->version = 1;
prop_list->writeback = 1; prop_list->writeback = 1;
......
...@@ -890,10 +890,8 @@ static int fimd_probe(struct platform_device *pdev) ...@@ -890,10 +890,8 @@ static int fimd_probe(struct platform_device *pdev)
if (dev->of_node) { if (dev->of_node) {
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) { if (!pdata)
DRM_ERROR("memory allocation for pdata failed\n");
return -ENOMEM; return -ENOMEM;
}
ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing, ret = of_get_fb_videomode(dev->of_node, &pdata->panel.timing,
OF_USE_NATIVE_MODE); OF_USE_NATIVE_MODE);
......
...@@ -447,10 +447,8 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev, ...@@ -447,10 +447,8 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
} }
g2d_userptr = kzalloc(sizeof(*g2d_userptr), GFP_KERNEL); g2d_userptr = kzalloc(sizeof(*g2d_userptr), GFP_KERNEL);
if (!g2d_userptr) { if (!g2d_userptr)
DRM_ERROR("failed to allocate g2d_userptr.\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
atomic_set(&g2d_userptr->refcount, 1); atomic_set(&g2d_userptr->refcount, 1);
...@@ -500,7 +498,6 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev, ...@@ -500,7 +498,6 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
sgt = kzalloc(sizeof(*sgt), GFP_KERNEL); sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
if (!sgt) { if (!sgt) {
DRM_ERROR("failed to allocate sg table.\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_free_userptr; goto err_free_userptr;
} }
...@@ -1087,8 +1084,6 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data, ...@@ -1087,8 +1084,6 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
e = kzalloc(sizeof(*node->event), GFP_KERNEL); e = kzalloc(sizeof(*node->event), GFP_KERNEL);
if (!e) { if (!e) {
dev_err(dev, "failed to allocate event\n");
spin_lock_irqsave(&drm_dev->event_lock, flags); spin_lock_irqsave(&drm_dev->event_lock, flags);
file->event_space += sizeof(e->event); file->event_space += sizeof(e->event);
spin_unlock_irqrestore(&drm_dev->event_lock, flags); spin_unlock_irqrestore(&drm_dev->event_lock, flags);
...@@ -1318,10 +1313,8 @@ static int g2d_open(struct drm_device *drm_dev, struct device *dev, ...@@ -1318,10 +1313,8 @@ static int g2d_open(struct drm_device *drm_dev, struct device *dev,
struct exynos_drm_g2d_private *g2d_priv; struct exynos_drm_g2d_private *g2d_priv;
g2d_priv = kzalloc(sizeof(*g2d_priv), GFP_KERNEL); g2d_priv = kzalloc(sizeof(*g2d_priv), GFP_KERNEL);
if (!g2d_priv) { if (!g2d_priv)
dev_err(dev, "failed to allocate g2d private data\n");
return -ENOMEM; return -ENOMEM;
}
g2d_priv->dev = dev; g2d_priv->dev = dev;
file_priv->g2d_priv = g2d_priv; file_priv->g2d_priv = g2d_priv;
...@@ -1377,10 +1370,8 @@ static int g2d_probe(struct platform_device *pdev) ...@@ -1377,10 +1370,8 @@ static int g2d_probe(struct platform_device *pdev)
int ret; int ret;
g2d = devm_kzalloc(dev, sizeof(*g2d), GFP_KERNEL); g2d = devm_kzalloc(dev, sizeof(*g2d), GFP_KERNEL);
if (!g2d) { if (!g2d)
dev_err(dev, "failed to allocate driver data\n");
return -ENOMEM; return -ENOMEM;
}
g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab", g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab",
sizeof(struct g2d_runqueue_node), 0, 0, NULL); sizeof(struct g2d_runqueue_node), 0, 0, NULL);
......
...@@ -191,10 +191,8 @@ struct exynos_drm_gem_obj *exynos_drm_gem_init(struct drm_device *dev, ...@@ -191,10 +191,8 @@ struct exynos_drm_gem_obj *exynos_drm_gem_init(struct drm_device *dev,
int ret; int ret;
exynos_gem_obj = kzalloc(sizeof(*exynos_gem_obj), GFP_KERNEL); exynos_gem_obj = kzalloc(sizeof(*exynos_gem_obj), GFP_KERNEL);
if (!exynos_gem_obj) { if (!exynos_gem_obj)
DRM_ERROR("failed to allocate exynos gem object\n");
return NULL; return NULL;
}
exynos_gem_obj->size = size; exynos_gem_obj->size = size;
obj = &exynos_gem_obj->base; obj = &exynos_gem_obj->base;
......
...@@ -1338,10 +1338,8 @@ static int gsc_init_prop_list(struct exynos_drm_ippdrv *ippdrv) ...@@ -1338,10 +1338,8 @@ static int gsc_init_prop_list(struct exynos_drm_ippdrv *ippdrv)
struct drm_exynos_ipp_prop_list *prop_list; struct drm_exynos_ipp_prop_list *prop_list;
prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL); prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL);
if (!prop_list) { if (!prop_list)
DRM_ERROR("failed to alloc property list.\n");
return -ENOMEM; return -ENOMEM;
}
prop_list->version = 1; prop_list->version = 1;
prop_list->writeback = 1; prop_list->writeback = 1;
......
...@@ -403,10 +403,8 @@ static int exynos_drm_hdmi_probe(struct platform_device *pdev) ...@@ -403,10 +403,8 @@ static int exynos_drm_hdmi_probe(struct platform_device *pdev)
struct drm_hdmi_context *ctx; struct drm_hdmi_context *ctx;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) { if (!ctx)
DRM_LOG_KMS("failed to alloc common hdmi context.\n");
return -ENOMEM; return -ENOMEM;
}
subdrv = &ctx->subdrv; subdrv = &ctx->subdrv;
......
...@@ -408,10 +408,8 @@ static struct drm_exynos_ipp_cmd_work *ipp_create_cmd_work(void) ...@@ -408,10 +408,8 @@ static struct drm_exynos_ipp_cmd_work *ipp_create_cmd_work(void)
struct drm_exynos_ipp_cmd_work *cmd_work; struct drm_exynos_ipp_cmd_work *cmd_work;
cmd_work = kzalloc(sizeof(*cmd_work), GFP_KERNEL); cmd_work = kzalloc(sizeof(*cmd_work), GFP_KERNEL);
if (!cmd_work) { if (!cmd_work)
DRM_ERROR("failed to alloc cmd_work.\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
INIT_WORK((struct work_struct *)cmd_work, ipp_sched_cmd); INIT_WORK((struct work_struct *)cmd_work, ipp_sched_cmd);
...@@ -423,10 +421,8 @@ static struct drm_exynos_ipp_event_work *ipp_create_event_work(void) ...@@ -423,10 +421,8 @@ static struct drm_exynos_ipp_event_work *ipp_create_event_work(void)
struct drm_exynos_ipp_event_work *event_work; struct drm_exynos_ipp_event_work *event_work;
event_work = kzalloc(sizeof(*event_work), GFP_KERNEL); event_work = kzalloc(sizeof(*event_work), GFP_KERNEL);
if (!event_work) { if (!event_work)
DRM_ERROR("failed to alloc event_work.\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
INIT_WORK((struct work_struct *)event_work, ipp_sched_event); INIT_WORK((struct work_struct *)event_work, ipp_sched_event);
...@@ -482,10 +478,8 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data, ...@@ -482,10 +478,8 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
/* allocate command node */ /* allocate command node */
c_node = kzalloc(sizeof(*c_node), GFP_KERNEL); c_node = kzalloc(sizeof(*c_node), GFP_KERNEL);
if (!c_node) { if (!c_node)
DRM_ERROR("failed to allocate map node.\n");
return -ENOMEM; return -ENOMEM;
}
/* create property id */ /* create property id */
ret = ipp_create_id(&ctx->prop_idr, &ctx->prop_lock, c_node, ret = ipp_create_id(&ctx->prop_idr, &ctx->prop_lock, c_node,
...@@ -694,10 +688,8 @@ static struct drm_exynos_ipp_mem_node ...@@ -694,10 +688,8 @@ static struct drm_exynos_ipp_mem_node
mutex_lock(&c_node->mem_lock); mutex_lock(&c_node->mem_lock);
m_node = kzalloc(sizeof(*m_node), GFP_KERNEL); m_node = kzalloc(sizeof(*m_node), GFP_KERNEL);
if (!m_node) { if (!m_node)
DRM_ERROR("failed to allocate queue node.\n");
goto err_unlock; goto err_unlock;
}
/* clear base address for error handling */ /* clear base address for error handling */
memset(&buf_info, 0x0, sizeof(buf_info)); memset(&buf_info, 0x0, sizeof(buf_info));
...@@ -798,9 +790,7 @@ static int ipp_get_event(struct drm_device *drm_dev, ...@@ -798,9 +790,7 @@ static int ipp_get_event(struct drm_device *drm_dev,
DRM_DEBUG_KMS("ops_id[%d]buf_id[%d]\n", qbuf->ops_id, qbuf->buf_id); DRM_DEBUG_KMS("ops_id[%d]buf_id[%d]\n", qbuf->ops_id, qbuf->buf_id);
e = kzalloc(sizeof(*e), GFP_KERNEL); e = kzalloc(sizeof(*e), GFP_KERNEL);
if (!e) { if (!e) {
DRM_ERROR("failed to allocate event.\n");
spin_lock_irqsave(&drm_dev->event_lock, flags); spin_lock_irqsave(&drm_dev->event_lock, flags);
file->event_space += sizeof(e->event); file->event_space += sizeof(e->event);
spin_unlock_irqrestore(&drm_dev->event_lock, flags); spin_unlock_irqrestore(&drm_dev->event_lock, flags);
...@@ -1780,10 +1770,8 @@ static int ipp_subdrv_open(struct drm_device *drm_dev, struct device *dev, ...@@ -1780,10 +1770,8 @@ static int ipp_subdrv_open(struct drm_device *drm_dev, struct device *dev,
struct exynos_drm_ipp_private *priv; struct exynos_drm_ipp_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) { if (!priv)
DRM_ERROR("failed to allocate priv.\n");
return -ENOMEM; return -ENOMEM;
}
priv->dev = dev; priv->dev = dev;
file_priv->ipp_priv = priv; file_priv->ipp_priv = priv;
......
...@@ -265,10 +265,8 @@ struct drm_plane *exynos_plane_init(struct drm_device *dev, ...@@ -265,10 +265,8 @@ struct drm_plane *exynos_plane_init(struct drm_device *dev,
int err; int err;
exynos_plane = kzalloc(sizeof(struct exynos_plane), GFP_KERNEL); exynos_plane = kzalloc(sizeof(struct exynos_plane), GFP_KERNEL);
if (!exynos_plane) { if (!exynos_plane)
DRM_ERROR("failed to allocate plane\n");
return NULL; return NULL;
}
err = drm_plane_init(dev, &exynos_plane->base, possible_crtcs, err = drm_plane_init(dev, &exynos_plane->base, possible_crtcs,
&exynos_plane_funcs, formats, ARRAY_SIZE(formats), &exynos_plane_funcs, formats, ARRAY_SIZE(formats),
......
...@@ -472,10 +472,8 @@ static int rotator_init_prop_list(struct exynos_drm_ippdrv *ippdrv) ...@@ -472,10 +472,8 @@ static int rotator_init_prop_list(struct exynos_drm_ippdrv *ippdrv)
struct drm_exynos_ipp_prop_list *prop_list; struct drm_exynos_ipp_prop_list *prop_list;
prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL); prop_list = devm_kzalloc(ippdrv->dev, sizeof(*prop_list), GFP_KERNEL);
if (!prop_list) { if (!prop_list)
DRM_ERROR("failed to alloc property list.\n");
return -ENOMEM; return -ENOMEM;
}
prop_list->version = 1; prop_list->version = 1;
prop_list->flip = (1 << EXYNOS_DRM_FLIP_VERTICAL) | prop_list->flip = (1 << EXYNOS_DRM_FLIP_VERTICAL) |
...@@ -713,10 +711,8 @@ static int rotator_probe(struct platform_device *pdev) ...@@ -713,10 +711,8 @@ static int rotator_probe(struct platform_device *pdev)
} }
rot = devm_kzalloc(dev, sizeof(*rot), GFP_KERNEL); rot = devm_kzalloc(dev, sizeof(*rot), GFP_KERNEL);
if (!rot) { if (!rot)
dev_err(dev, "failed to allocate rot\n");
return -ENOMEM; return -ENOMEM;
}
match = of_match_node(exynos_rotator_match, dev->of_node); match = of_match_node(exynos_rotator_match, dev->of_node);
if (!match) { if (!match) {
......
...@@ -1825,10 +1825,8 @@ static int hdmi_resources_init(struct hdmi_context *hdata) ...@@ -1825,10 +1825,8 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
res->regul_bulk = devm_kzalloc(dev, ARRAY_SIZE(supply) * res->regul_bulk = devm_kzalloc(dev, ARRAY_SIZE(supply) *
sizeof(res->regul_bulk[0]), GFP_KERNEL); sizeof(res->regul_bulk[0]), GFP_KERNEL);
if (!res->regul_bulk) { if (!res->regul_bulk)
DRM_ERROR("failed to get memory for regulators\n");
goto fail; goto fail;
}
for (i = 0; i < ARRAY_SIZE(supply); ++i) { for (i = 0; i < ARRAY_SIZE(supply); ++i) {
res->regul_bulk[i].supply = supply[i]; res->regul_bulk[i].supply = supply[i];
res->regul_bulk[i].consumer = NULL; res->regul_bulk[i].consumer = NULL;
...@@ -1869,10 +1867,8 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata ...@@ -1869,10 +1867,8 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
u32 value; u32 value;
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
if (!pd) { if (!pd)
DRM_ERROR("memory allocation for pdata failed\n");
goto err_data; goto err_data;
}
if (!of_find_property(np, "hpd-gpio", &value)) { if (!of_find_property(np, "hpd-gpio", &value)) {
DRM_ERROR("no hpd gpio property found\n"); DRM_ERROR("no hpd gpio property found\n");
...@@ -1952,17 +1948,13 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -1952,17 +1948,13 @@ static int hdmi_probe(struct platform_device *pdev)
drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx),
GFP_KERNEL); GFP_KERNEL);
if (!drm_hdmi_ctx) { if (!drm_hdmi_ctx)
DRM_ERROR("failed to allocate common hdmi context.\n");
return -ENOMEM; return -ENOMEM;
}
hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), hdata = devm_kzalloc(dev, sizeof(struct hdmi_context),
GFP_KERNEL); GFP_KERNEL);
if (!hdata) { if (!hdata)
DRM_ERROR("out of memory\n");
return -ENOMEM; return -ENOMEM;
}
mutex_init(&hdata->hdmi_mutex); mutex_init(&hdata->hdmi_mutex);
......
...@@ -1186,16 +1186,12 @@ static int mixer_probe(struct platform_device *pdev) ...@@ -1186,16 +1186,12 @@ static int mixer_probe(struct platform_device *pdev)
drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx),
GFP_KERNEL); GFP_KERNEL);
if (!drm_hdmi_ctx) { if (!drm_hdmi_ctx)
DRM_ERROR("failed to allocate common hdmi context.\n");
return -ENOMEM; return -ENOMEM;
}
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) { if (!ctx)
DRM_ERROR("failed to alloc mixer context.\n");
return -ENOMEM; return -ENOMEM;
}
mutex_init(&ctx->mixer_mutex); mutex_init(&ctx->mixer_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册