mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org (open list),
	linux-samsung-soc@vger.kernel.org (moderated list:ARM/S5P EXYNOS
	AR...)
Subject: [PATCH 06/12] drm/exynos/ipp: remove incorrect checks of list_first_entry result
Date: Thu, 03 Jul 2014 15:10:31 +0200	[thread overview]
Message-ID: <1404393037-17299-7-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1404393037-17299-1-git-send-email-a.hajda@samsung.com>

list_first_entry does not return NULL on empty list so this check
does not make sense. Moreover there is already code which prevents calling
list_first_entry on empty lists.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_ipp.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index f84ef8a..89ff7e3 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -1277,11 +1277,6 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
 
 			m_node = list_first_entry(head,
 				struct drm_exynos_ipp_mem_node, list);
-			if (!m_node) {
-				DRM_ERROR("failed to get node.\n");
-				ret = -EFAULT;
-				goto err_unlock;
-			}
 
 			DRM_DEBUG_KMS("m_node[0x%x]\n", (int)m_node);
 
@@ -1539,11 +1534,6 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
 
 			m_node = list_first_entry(head,
 				struct drm_exynos_ipp_mem_node, list);
-			if (!m_node) {
-				DRM_ERROR("empty memory node.\n");
-				ret = -ENOMEM;
-				goto err_mem_unlock;
-			}
 
 			tbuf_id[i] = m_node->buf_id;
 			DRM_DEBUG_KMS("%s buf_id[%d]\n",
@@ -1580,11 +1570,6 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
 
 		m_node = list_first_entry(head,
 			struct drm_exynos_ipp_mem_node, list);
-		if (!m_node) {
-			DRM_ERROR("empty memory node.\n");
-			ret = -ENOMEM;
-			goto err_mem_unlock;
-		}
 
 		tbuf_id[EXYNOS_DRM_OPS_SRC] = m_node->buf_id;
 
-- 
1.9.1


  parent reply	other threads:[~2014-07-03 13:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 13:10 [PATCH 00/12] drm/exynos/ipp: image post processing improvements, part three Andrzej Hajda
2014-07-03 13:10 ` [PATCH 01/12] drm/exynos/ipp: remove type casting Andrzej Hajda
2014-07-03 13:10 ` [PATCH 02/12] drm/exynos/ipp: remove unused field from exynos_drm_ipp_private Andrzej Hajda
2014-07-03 13:10 ` [PATCH 03/12] drm/exynos/ipp: remove struct exynos_drm_ipp_private Andrzej Hajda
2014-07-03 13:10 ` [PATCH 04/12] drm/exynos/ipp: correct address type Andrzej Hajda
2014-07-03 13:10 ` [PATCH 05/12] drm/exynos/ipp: remove temporary variable Andrzej Hajda
2014-07-03 13:10 ` Andrzej Hajda [this message]
2014-07-03 13:10 ` [PATCH 07/12] drm/exynos/ipp: simplify memory check function Andrzej Hajda
2014-07-03 13:10 ` [PATCH 08/12] drm/exynos/ipp: remove useless registration checks Andrzej Hajda
2014-07-03 13:10 ` [PATCH 09/12] drm/exynos/ipp: simplify ipp_find_obj Andrzej Hajda
2014-07-03 13:10 ` [PATCH 10/12] drm/exynos/ipp: remove redundant messages Andrzej Hajda
2014-07-03 13:10 ` [PATCH 11/12] drm/exynos/ipp: simplify ipp_create_id Andrzej Hajda
2014-07-03 13:10 ` [PATCH 12/12] drm/exynos/ipp: simplify ipp_find_driver Andrzej Hajda
2014-07-09 14:47 ` [PATCH 00/12] drm/exynos/ipp: image post processing improvements, part three Inki Dae
2014-07-21  9:23   ` Andrzej Hajda
2014-07-22  0:54     ` Inki Dae
2014-07-22 13:42 ` Inki Dae

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404393037-17299-7-git-send-email-a.hajda@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®