[COMMON] g2d: unlock the spinlock on error handling
authorhyesoo.yu <hyesoo.yu@samsung.com>
Wed, 19 Jul 2017 13:40:11 +0000 (22:40 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:30 +0000 (14:27 +0900)
The workqueue must be terminated after the spinlock
has been released. However, that is missing when
handing of suspend, so fix it.

BUG: workqueue leaked lock or atomic: kworker/u16:8/0x00000001/5856

Change-Id: I6f9a36095dd9673dd57e38f24a3d306e1407529a
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_task.c

index af335925e7f2e172e625bac35a8e58c2fa44a5fe..b01ecbe5727c170a2debe483012862507aa5933a 100644 (file)
@@ -291,10 +291,8 @@ static void g2d_schedule_task(struct g2d_task *task)
        list_add_tail(&task->node, &g2d_dev->tasks_prepared);
        change_task_state_prepared(task);
 
-       if (!!(g2d_dev->state & (1 << G2D_DEVICE_STATE_SUSPEND)))
-               return;
-
-       g2d_execute_task(g2d_dev, task);
+       if (!(g2d_dev->state & (1 << G2D_DEVICE_STATE_SUSPEND)))
+               g2d_execute_task(g2d_dev, task);
 
        spin_unlock_irqrestore(&g2d_dev->lock_task, flags);
        return;