drm/exynos: exynos_drm_ipp: Fix incorrect usage of IS_ERR_OR_NULL
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 29 Apr 2013 06:57:06 +0000 (12:27 +0530)
committerInki Dae <inki.dae@samsung.com>
Wed, 22 May 2013 02:45:45 +0000 (11:45 +0900)
None of these functions actually return a NULL pointer. Hence use
IS_ERR() instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_ipp.c

index 29d2ad314490126302ed65e5cb9f79b5afd896f1..5c4764af7cb9dbdd0f25c0a04a59786f1bcc3672 100644 (file)
@@ -222,7 +222,7 @@ static struct exynos_drm_ippdrv *ipp_find_driver(struct ipp_context *ctx,
                /* find ipp driver using idr */
                ippdrv = ipp_find_obj(&ctx->ipp_idr, &ctx->ipp_lock,
                        ipp_id);
-               if (IS_ERR_OR_NULL(ippdrv)) {
+               if (IS_ERR(ippdrv)) {
                        DRM_ERROR("not found ipp%d driver.\n", ipp_id);
                        return ippdrv;
                }
@@ -388,7 +388,7 @@ static int ipp_find_and_set_property(struct drm_exynos_ipp_property *property)
        DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, prop_id);
 
        ippdrv = ipp_find_drv_by_handle(prop_id);
-       if (IS_ERR_OR_NULL(ippdrv)) {
+       if (IS_ERR(ippdrv)) {
                DRM_ERROR("failed to get ipp driver.\n");
                return -EINVAL;
        }
@@ -492,7 +492,7 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
 
        /* find ipp driver using ipp id */
        ippdrv = ipp_find_driver(ctx, property);
-       if (IS_ERR_OR_NULL(ippdrv)) {
+       if (IS_ERR(ippdrv)) {
                DRM_ERROR("failed to get ipp driver.\n");
                return -EINVAL;
        }
@@ -521,19 +521,19 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
        c_node->state = IPP_STATE_IDLE;
 
        c_node->start_work = ipp_create_cmd_work();
-       if (IS_ERR_OR_NULL(c_node->start_work)) {
+       if (IS_ERR(c_node->start_work)) {
                DRM_ERROR("failed to create start work.\n");
                goto err_clear;
        }
 
        c_node->stop_work = ipp_create_cmd_work();
-       if (IS_ERR_OR_NULL(c_node->stop_work)) {
+       if (IS_ERR(c_node->stop_work)) {
                DRM_ERROR("failed to create stop work.\n");
                goto err_free_start;
        }
 
        c_node->event_work = ipp_create_event_work();
-       if (IS_ERR_OR_NULL(c_node->event_work)) {
+       if (IS_ERR(c_node->event_work)) {
                DRM_ERROR("failed to create event work.\n");
                goto err_free_stop;
        }
@@ -915,7 +915,7 @@ static int ipp_queue_buf_with_run(struct device *dev,
        DRM_DEBUG_KMS("%s\n", __func__);
 
        ippdrv = ipp_find_drv_by_handle(qbuf->prop_id);
-       if (IS_ERR_OR_NULL(ippdrv)) {
+       if (IS_ERR(ippdrv)) {
                DRM_ERROR("failed to get ipp driver.\n");
                return -EFAULT;
        }