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: 16552 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 79E1623942 for ; Wed, 1 May 2013 09:29:11 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id b12sf2588221yha.10 for ; Wed, 01 May 2013 02:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=5s4aqQBzoHQYYH0mWxG9LksYIjsB555gcaoEbi9+IeE=; b=ZTwwXkTtlOuCw0VW/41dsTlwgrZg6WWmi+O7uOrai18pOirflkJJTQEsmA8qserdjI 7Uhg0Z6LGEwBi/QIW6bcGnAvNO4LF1KaKIqifRTvtlZckrJ8xromVCRRXVWL8/2rVSAs tZhaWiMIgdUf6EBy+NBGg/TBwVtDTIh9+VlA7P3sh9ZKJ5/UlHPl0srwpxMpDQ89wWMC MeF7aWvaaz/6nUVIDQToRUOPrRArEpD4TdqBr/h7spL+iwt/WZPeLME9tMS9hUYQqKxZ ieZl0jVTB8cluk1Rzbf8h8rBVi7yyUt4Dfas3t93k3OpiOxUmvcLoB7J415Y3Xk5GzDJ vFnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=5s4aqQBzoHQYYH0mWxG9LksYIjsB555gcaoEbi9+IeE=; b=DQ8NkGr8O/yfdQqdeJOrnCAaRaWrvgySaX0EA41d8oaz1mXgowm5DXjWer+KVO7pnx TK2mY/St7b7IxLUthBX62JZcZpNjRtErfSeQKpABB2RHF8PXc7Xhd5rqeITW4W6JKixM 1OyjW8WTWu9MwcQDJWlEspF+L2TMkV0NRelRy1paAXAC3vpK2hZZ2Knv/ti/L7dHUl5u 3GB0h9i5r106LMF7R2jGY3ScbniiSgWbmjYGy1i2Ftgl1UFNpoBxWgC4LSiaBn4FJm7D c0BwlgKsxOP0ci7iSux/71+uNWWB424NDhaMdYOSksNfEeNNAb6du2F+7+i282xdq2or 0hWw== X-Received: by 10.236.189.241 with SMTP id c77mr1530889yhn.17.1367400546349; Wed, 01 May 2013 02:29:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.108.134 with SMTP id hk6ls749906qeb.72.gmail; Wed, 01 May 2013 02:29:05 -0700 (PDT) X-Received: by 10.220.156.75 with SMTP id v11mr674981vcw.1.1367400545759; Wed, 01 May 2013 02:29:05 -0700 (PDT) Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com [2607:f8b0:400c:c02::22c]) by mx.google.com with ESMTPS id ez9si910124vdb.133.2013.05.01.02.29.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 02:29:05 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22c is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22c; Received: by mail-vb0-f44.google.com with SMTP id e13so1113758vbg.31 for ; Wed, 01 May 2013 02:29:05 -0700 (PDT) X-Received: by 10.58.230.130 with SMTP id sy2mr642921vec.22.1367400545655; Wed, 01 May 2013 02:29:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp146010veb; Wed, 1 May 2013 02:29:04 -0700 (PDT) X-Received: by 10.15.27.195 with SMTP id p43mr5983115eeu.8.1367400544395; Wed, 01 May 2013 02:29:04 -0700 (PDT) Received: from mail-ea0-x22c.google.com (mail-ea0-x22c.google.com [2a00:1450:4013:c01::22c]) by mx.google.com with ESMTPS id i3si2354589eev.63.2013.05.01.02.29.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 02:29:04 -0700 (PDT) Received-SPF: pass (google.com: domain of sylvester.nawrocki@gmail.com designates 2a00:1450:4013:c01::22c as permitted sender) client-ip=2a00:1450:4013:c01::22c; Received: by mail-ea0-f172.google.com with SMTP id z16so612621ead.31 for ; Wed, 01 May 2013 02:29:03 -0700 (PDT) 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> X-Gm-Message-State: ALoCoQkjIocznYovbye5U/z828hMc+l0mmW2Lj6hxy2YxELmteQvffD+LuLj6czUXHmfVOwAw2tI X-Original-Sender: sylvester.nawrocki@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22c is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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; }