From patchwork Tue Dec 18 08:28:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Prisk X-Patchwork-Id: 1891291 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 2260B3FC64 for ; Tue, 18 Dec 2012 10:52:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3081E6243 for ; Tue, 18 Dec 2012 02:52:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 581 seconds by postgrey-1.32 at gabe; Tue, 18 Dec 2012 00:38:43 PST Received: from server.prisktech.co.nz (server.prisktech.co.nz [115.188.14.127]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E30BE5EAB for ; Tue, 18 Dec 2012 00:38:43 -0800 (PST) Received: from localhost.localdomain (unknown [192.168.0.102]) by server.prisktech.co.nz (Postfix) with ESMTP id 5543AFC0938; Tue, 18 Dec 2012 21:29:00 +1300 (NZDT) From: Tony Prisk To: Mike Turquette Subject: [PATCH 2/6] clk: exynos: Fix incorrect usage of IS_ERR_OR_NULL Date: Tue, 18 Dec 2012 21:28:37 +1300 Message-Id: <1355819321-21914-3-git-send-email-linux@prisktech.co.nz> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355819321-21914-1-git-send-email-linux@prisktech.co.nz> References: <1355819321-21914-1-git-send-email-linux@prisktech.co.nz> X-Mailman-Approved-At: Tue, 18 Dec 2012 01:37:38 -0800 Cc: Seung-Woo Kim , dri-devel@lists.freedesktop.org, Tony Prisk , Kyungmin Park 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 Replace IS_ERR_OR_NULL with IS_ERR on clk_get results. In the fail: path of mixer_resources_init() and vp_resources_init() the first clk tested cannot be NULL either, so IS_ERR_OR_NULL is removed from these as well. Other clocks may still be NULL as they haven't been clk_get'd yet. Signed-off-by: Tony Prisk CC: Inki Dae CC: Joonyoung Shim CC: Seung-Woo Kim CC: Kyungmin Park CC: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/exynos/exynos_mixer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index e7fbb82..dbd97c0 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -972,14 +972,14 @@ static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, spin_lock_init(&mixer_res->reg_slock); mixer_res->mixer = clk_get(dev, "mixer"); - if (IS_ERR_OR_NULL(mixer_res->mixer)) { + if (IS_ERR(mixer_res->mixer)) { dev_err(dev, "failed to get clock 'mixer'\n"); ret = -ENODEV; goto fail; } mixer_res->sclk_hdmi = clk_get(dev, "sclk_hdmi"); - if (IS_ERR_OR_NULL(mixer_res->sclk_hdmi)) { + if (IS_ERR(mixer_res->sclk_hdmi)) { dev_err(dev, "failed to get clock 'sclk_hdmi'\n"); ret = -ENODEV; goto fail; @@ -1019,7 +1019,7 @@ static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, fail: if (!IS_ERR_OR_NULL(mixer_res->sclk_hdmi)) clk_put(mixer_res->sclk_hdmi); - if (!IS_ERR_OR_NULL(mixer_res->mixer)) + if (!IS_ERR(mixer_res->mixer)) clk_put(mixer_res->mixer); return ret; } @@ -1034,19 +1034,19 @@ static int __devinit vp_resources_init(struct exynos_drm_hdmi_context *ctx, int ret; mixer_res->vp = clk_get(dev, "vp"); - if (IS_ERR_OR_NULL(mixer_res->vp)) { + if (IS_ERR(mixer_res->vp)) { dev_err(dev, "failed to get clock 'vp'\n"); ret = -ENODEV; goto fail; } mixer_res->sclk_mixer = clk_get(dev, "sclk_mixer"); - if (IS_ERR_OR_NULL(mixer_res->sclk_mixer)) { + if (IS_ERR(mixer_res->sclk_mixer)) { dev_err(dev, "failed to get clock 'sclk_mixer'\n"); ret = -ENODEV; goto fail; } mixer_res->sclk_dac = clk_get(dev, "sclk_dac"); - if (IS_ERR_OR_NULL(mixer_res->sclk_dac)) { + if (IS_ERR(mixer_res->sclk_dac)) { dev_err(dev, "failed to get clock 'sclk_dac'\n"); ret = -ENODEV; goto fail; @@ -1077,7 +1077,7 @@ fail: clk_put(mixer_res->sclk_dac); if (!IS_ERR_OR_NULL(mixer_res->sclk_mixer)) clk_put(mixer_res->sclk_mixer); - if (!IS_ERR_OR_NULL(mixer_res->vp)) + if (!IS_ERR(mixer_res->vp)) clk_put(mixer_res->vp); return ret; }