summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHyungwon Hwang <human.hwang@samsung.com>2014-08-22 14:35:03 +0900
committerHyungwon Hwang <human.hwang@samsung.com>2014-08-22 14:38:03 +0900
commit88cc2848ff065698de0c19cb4f014154ceeffb48 (patch)
treec26154f0f3b04b281998479eff255b75e5097868 /drivers
parentd36858b437dcfbaf72d05279091ce809c70da2b3 (diff)
downloadlinux-3.10-88cc2848ff065698de0c19cb4f014154ceeffb48.tar.gz
linux-3.10-88cc2848ff065698de0c19cb4f014154ceeffb48.tar.bz2
linux-3.10-88cc2848ff065698de0c19cb4f014154ceeffb48.zip
exynos/drm: ipp: fix to get null when the list is empty
list_first_entry does not return null, when the list is empty. Change-Id: I014e2ef5ba035db3b6fc97e6821bc9869143f867 Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index fb2f1bdfc10..53f505b96e4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -1302,7 +1302,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
/* source/destination memory list */
head = &c_node->mem_list[i];
- m_node = list_first_entry(head,
+ m_node = list_first_entry_or_null(head,
struct drm_exynos_ipp_mem_node, list);
if (!m_node) {
DRM_ERROR("failed to get node.\n");
@@ -1566,7 +1566,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
/* source/destination memory list */
head = &c_node->mem_list[i];
- m_node = list_first_entry(head,
+ m_node = list_first_entry_or_null(head,
struct drm_exynos_ipp_mem_node, list);
if (!m_node) {
DRM_ERROR("empty memory node.\n");
@@ -1605,7 +1605,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
/* source memory list */
head = &c_node->mem_list[EXYNOS_DRM_OPS_SRC];
- m_node = list_first_entry(head,
+ m_node = list_first_entry_or_null(head,
struct drm_exynos_ipp_mem_node, list);
if (!m_node) {
DRM_ERROR("empty memory node.\n");
@@ -1633,7 +1633,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
* then we make event and link to event list tail.
* so, we get first event for first enqueued buffer.
*/
- e = list_first_entry(&c_node->event_list,
+ e = list_first_entry_or_null(&c_node->event_list,
struct drm_exynos_ipp_send_event, base.link);
if (!e) {