From patchwork Wed Apr 11 21:14:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 10337417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F37246053B for ; Wed, 11 Apr 2018 21:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E03A02465D for ; Wed, 11 Apr 2018 21:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D454727FE4; Wed, 11 Apr 2018 21:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 628B42465D for ; Wed, 11 Apr 2018 21:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vOh7xcWUKDM3tfDokQEhJ2bdVTdrwy85S1jLFtZQVEQ=; b=jAyH5GQhR+T6C7 RKfcXFPVVzmN6MisEeIfvXZxvJ4ivFLF0PPHgrFu2UmJLoqhzzgYudOC0NmdVMsyQVZ48+BpU9dDZ l6BjY6ES58ZyjehV3ZM3xB2cIFwlZmur2NuNv2hMScz+XCoHCpE+wsOiR0Laf/VaxyxoIpPHD7G7q CimWMA6GQ9pydfLH0qHmabgPUXCayjHn/c8FSH0rma67FHSz6fwN8IPbNq9vRJA7o/jELqDA1PLyl 8FVmDCjbzmfS7qTnQzgBxl6F338RMP1L1eMJgVXzcr/7QdmL3BMJa5+OC942vzRZ8IuA32xojffC8 KrN+/Jf44wQfNFl8cWiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6N5v-0002XJ-VB; Wed, 11 Apr 2018 21:15:55 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6N5U-0002Fo-Vn; Wed, 11 Apr 2018 21:15:31 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 14:15:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,438,1517904000"; d="scan'208";a="32972562" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga008.jf.intel.com with ESMTP; 11 Apr 2018 14:15:13 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1f6N5E-000EZq-Cp; Thu, 12 Apr 2018 05:15:12 +0800 Date: Thu, 12 Apr 2018 05:14:39 +0800 From: kbuild test robot To: Ryder Lee Subject: [PATCH] media: vcodec: fix ptr_ret.cocci warnings Message-ID: <20180411211439.GA16400@lkp-wsm-ep1> References: <201804120528.xhFwZKle%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201804120528.xhFwZKle%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180411_141529_071413_3ED0791F X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Liu , Rick Chang , linux-kernel@vger.kernel.org, Hans Verkuil , linux-mediatek@lists.infradead.org, kbuild-all@01.org, Matthias Brugger , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fengguang Wu drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1087:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 648a9576932a ("media: vcodec: fix error return value from mtk_jpeg_clk_init()") CC: Ryder Lee Signed-off-by: Fengguang Wu --- mtk_jpeg_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1084,10 +1084,7 @@ static int mtk_jpeg_clk_init(struct mtk_ return PTR_ERR(jpeg->clk_jdec); jpeg->clk_jdec_smi = devm_clk_get(jpeg->dev, "jpgdec-smi"); - if (IS_ERR(jpeg->clk_jdec_smi)) - return PTR_ERR(jpeg->clk_jdec_smi); - - return 0; + return PTR_ERR_OR_ZERO(jpeg->clk_jdec_smi); } static int mtk_jpeg_probe(struct platform_device *pdev)