From patchwork Mon Apr 29 09:24:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2499081 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4F24D3FD1A for ; Mon, 29 Apr 2013 09:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755465Ab3D2Jhr (ORCPT ); Mon, 29 Apr 2013 05:37:47 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:44988 "EHLO mail-da0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774Ab3D2Jhq (ORCPT ); Mon, 29 Apr 2013 05:37:46 -0400 Received: by mail-da0-f44.google.com with SMTP id z20so1422158dae.17 for ; Mon, 29 Apr 2013 02:37:46 -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 :x-gm-message-state; bh=qNWXD4nUm03OTbJACMGBj4gBekVBemnyGgsa67f1JcU=; b=ieS8xsWTr9sHE8OMy207wlSjGRP31Z/Pa9ogarIT3wnI55SANQBHlhmrRNuZasghvA OkQSzifnszCUYX7jRpwmolyToUyL/VU5cQ3OTJtFh6V4dSACbsfrleMd8X5ChNVd3xsV 7mPz1sUox2OEj0G5sXHpTYvgZXIMqi94x7GxjTjBBTYPMHo6u71Ey6S+dtalevnc9Evf Jfdgz4PRhnVnC6RLphWY91zazDHmYWJ8qOC3eF7TPou7ADFALGPTcnY5QmAH0c01q8gb S6czzzNNelroHrh4cOvQRomQIVp9pwJktT6MAX7SfwxsQjY3/aqf1ic96xXJQwUhAcgl LaUA== X-Received: by 10.66.178.5 with SMTP id cu5mr42365477pac.16.1367228266343; Mon, 29 Apr 2013 02:37:46 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id br2sm23328203pbc.46.2013.04.29.02.37.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 02:37:45 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: t.stanislaws@samsung.com, s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/3] [media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in hdmi_drv.c Date: Mon, 29 Apr 2013 14:54:57 +0530 Message-Id: <1367227499-543-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQn0v5KIzsrmOy/6PB3j6FaL6uyjUHaxBxdR2aE3l7WI3uNxPZNOAon4CEZgzqCeRCr3Ib1p Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org NULL check on clocks obtained using common clock APIs should not be done. Use IS_ERR only. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-tv/hdmi_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c index 4e86626..b3344cb 100644 --- a/drivers/media/platform/s5p-tv/hdmi_drv.c +++ b/drivers/media/platform/s5p-tv/hdmi_drv.c @@ -765,15 +765,15 @@ static void hdmi_resources_cleanup(struct hdmi_device *hdev) regulator_bulk_free(res->regul_count, res->regul_bulk); /* kfree is NULL-safe */ kfree(res->regul_bulk); - if (!IS_ERR_OR_NULL(res->hdmiphy)) + if (!IS_ERR(res->hdmiphy)) clk_put(res->hdmiphy); - if (!IS_ERR_OR_NULL(res->sclk_hdmiphy)) + if (!IS_ERR(res->sclk_hdmiphy)) clk_put(res->sclk_hdmiphy); - if (!IS_ERR_OR_NULL(res->sclk_pixel)) + if (!IS_ERR(res->sclk_pixel)) clk_put(res->sclk_pixel); - if (!IS_ERR_OR_NULL(res->sclk_hdmi)) + if (!IS_ERR(res->sclk_hdmi)) clk_put(res->sclk_hdmi); - if (!IS_ERR_OR_NULL(res->hdmi)) + if (!IS_ERR(res->hdmi)) clk_put(res->hdmi); memset(res, 0, sizeof(*res)); }