diff options
author | Hyungwon Hwang <human.hwang@samsung.com> | 2014-08-22 14:35:03 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:40 +0900 |
commit | d99191642702d40261c4ad1d1c15681bcedb5fdc (patch) | |
tree | e0dbdb171952e97256b69f1c1c3ee5ffd7c0a73e | |
parent | 1deff0968e69f0d1dea5a826fb9971fb236885ef (diff) | |
download | linux-3.10-d99191642702d40261c4ad1d1c15681bcedb5fdc.tar.gz linux-3.10-d99191642702d40261c4ad1d1c15681bcedb5fdc.tar.bz2 linux-3.10-d99191642702d40261c4ad1d1c15681bcedb5fdc.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>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 8 |
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) { |