From patchwork Mon Apr 29 06:57:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2500371 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 919353FD85 for ; Mon, 29 Apr 2013 14:02:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7866BE608F for ; Mon, 29 Apr 2013 07:02:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-da0-f44.google.com (mail-da0-f44.google.com [209.85.210.44]) by gabe.freedesktop.org (Postfix) with ESMTP id AC9B0E5D16 for ; Mon, 29 Apr 2013 00:09:54 -0700 (PDT) Received: by mail-da0-f44.google.com with SMTP id z20so1371818dae.17 for ; Mon, 29 Apr 2013 00:09:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=WHysX89IMQF1KB5OV4ZgkuYg0awED60r5Rcx5Rz4Dzc=; b=J0DwPOQwQ/dIURz2nLKKHrn0fK2mqQDIy1TGE5IwOlo9Oh6genspnANvyPbyaGoc1t ieQXMdbWLr4Fkf1a3KrPH2vxewTv0ihzTrpFC8u8Eyo2unFTCVvfoVy2Kce70lCHYE78 syW88+Sob6HMMWSXnaochZoa7PUKDpzDsmvkYCxb9aK+91IusEe/ka0W8tGDv0gi/0bF sveKKdMyq569rUC02BU+F+8X1PQScGR2lhzYCT5Rx3iejviCIGb2dnZbDP9027JeZNFU 0r7yUTpxVpQNhcynWxGVsQ2XscdIray/t9qd6mRFheOpS8P8MfZQC5rYTs8QrHn3Yzh9 0FCQ== X-Received: by 10.67.1.39 with SMTP id bd7mr56467037pad.194.1367219394572; Mon, 29 Apr 2013 00:09:54 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id al2sm22875654pbc.25.2013.04.29.00.09.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 00:09:53 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/exynos: exynos_drm_ipp: Fix incorrect usage of IS_ERR_OR_NULL Date: Mon, 29 Apr 2013 12:27:06 +0530 Message-Id: <1367218626-13782-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1367218626-13782-1-git-send-email-sachin.kamat@linaro.org> References: <1367218626-13782-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnTvR447LvGMojm82Gkadn+fgydgH+NAN8W+MNVj6yUUl+Gl7QjfFLtOC/fV5jStdjpe6K8 X-Mailman-Approved-At: Mon, 29 Apr 2013 06:59:45 -0700 Cc: sachin.kamat@linaro.org, patches@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org None of these functions actually return a NULL pointer. Hence use IS_ERR() instead. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 29d2ad3..5c4764a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -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; }