Skip to content

Commit

Permalink
drm/exynos: g2d: Delete an error message for a failed memory allocati…
Browse files Browse the repository at this point in the history
…on in two 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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Markus Elfring authored and Inki Dae committed Feb 20, 2018
1 parent 1293b61 commit 6f0a602
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/exynos/exynos_drm_g2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ static int g2d_init_cmdlist(struct g2d_data *g2d)

node = kcalloc(G2D_CMDLIST_NUM, sizeof(*node), GFP_KERNEL);
if (!node) {
dev_err(dev, "failed to allocate memory\n");
ret = -ENOMEM;
goto err;
}
Expand Down Expand Up @@ -1358,10 +1357,9 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,
return -EFAULT;

runqueue_node = kmem_cache_alloc(g2d->runqueue_slab, GFP_KERNEL);
if (!runqueue_node) {
dev_err(dev, "failed to allocate memory\n");
if (!runqueue_node)
return -ENOMEM;
}

run_cmdlist = &runqueue_node->run_cmdlist;
event_list = &runqueue_node->event_list;
INIT_LIST_HEAD(run_cmdlist);
Expand Down

0 comments on commit 6f0a602

Please sign in to comment.