From patchwork Wed May 1 09:29:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 2507291 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CDECFDF230 for ; Wed, 1 May 2013 09:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758751Ab3EAJ3H (ORCPT ); Wed, 1 May 2013 05:29:07 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:51070 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758529Ab3EAJ3F (ORCPT ); Wed, 1 May 2013 05:29:05 -0400 Received: by mail-ee0-f54.google.com with SMTP id e49so588492eek.27 for ; Wed, 01 May 2013 02:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=5s4aqQBzoHQYYH0mWxG9LksYIjsB555gcaoEbi9+IeE=; b=CUNOYlgprwsxGvafwlxeLcGWkB0nvrWSIX5Ty/bq1soBDk8om/oNUQXDm1MyROXmIf yDud2byvQrNU9XXJkEnIauXLtfFWxzPSkhvOox3tDMjjB5rYIsKUXEGV3J3hRnivJMuS HgbWo42z3yZ4d8VCaEzGGs3DSisDzwzc7HNov5J8RO5MbHHnMKLZPEv86EuFIgqvvHYA O7/U4oL6X42J7IuLVvJxSAtWOnJii+cISGvj+GL4+jnA3Hdwje5PnGz/pmJWq6EyTGzV Wt25Jma1bz0JYkIIeohgZORhmAEt7F8XebNCWR+2mkihWXYb5fQkcG0QxS59CR9rcvbY Em2Q== X-Received: by 10.14.182.72 with SMTP id n48mr6080428eem.3.1367400543112; Wed, 01 May 2013 02:29:03 -0700 (PDT) Received: from [192.168.1.110] (093105185086.warszawa.vectranet.pl. [93.105.185.86]) by mx.google.com with ESMTPSA id bj12sm2659131eeb.8.2013.05.01.02.29.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 02:29:02 -0700 (PDT) Message-ID: <5180E05C.7020206@gmail.com> Date: Wed, 01 May 2013 11:29:00 +0200 From: Sylwester Nawrocki User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120412 Thunderbird/11.0.1 MIME-Version: 1.0 To: Sachin Kamat CC: linux-media@vger.kernel.org, s.nawrocki@samsung.com, patches@linaro.org Subject: Re: [PATCH 1/1] [media] exynos4-is: Remove redundant NULL check in fimc-lite.c References: <1367297493-31782-1-git-send-email-sachin.kamat@linaro.org> In-Reply-To: <1367297493-31782-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sachin, On 04/30/2013 06:51 AM, Sachin Kamat wrote: > clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL > to IS_ERR only. > > Signed-off-by: Sachin Kamat > --- > drivers/media/platform/exynos4-is/fimc-lite.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c > index 661d0d1..2a0ef82 100644 > --- a/drivers/media/platform/exynos4-is/fimc-lite.c > +++ b/drivers/media/platform/exynos4-is/fimc-lite.c > @@ -1416,7 +1416,7 @@ static void fimc_lite_unregister_capture_subdev(struct fimc_lite *fimc) > > static void fimc_lite_clk_put(struct fimc_lite *fimc) > { > - if (IS_ERR_OR_NULL(fimc->clock)) > + if (IS_ERR(fimc->clock)) > return; > > clk_unprepare(fimc->clock); I've queued this patch for 3.11 with the below chunk squashed to it: Thanks. Sylwester --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 2ede148..faf2a75 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1422,7 +1422,7 @@ static void fimc_lite_clk_put(struct fimc_lite *fimc) clk_unprepare(fimc->clock); clk_put(fimc->clock); - fimc->clock = NULL; + fimc->clock = ERR_PTR(-EINVAL); } static int fimc_lite_clk_get(struct fimc_lite *fimc) @@ -1436,7 +1436,7 @@ static int fimc_lite_clk_get(struct fimc_lite *fimc) ret = clk_prepare(fimc->clock); if (ret < 0) { clk_put(fimc->clock); - fimc->clock = NULL; + fimc->clock = ERR_PTR(-EINVAL); } return ret; }