From patchwork Wed Jan 24 00:43:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10181215 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 B3057601D5 for ; Wed, 24 Jan 2018 01:06:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98598287DA for ; Wed, 24 Jan 2018 01:06:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BB71287F8; Wed, 24 Jan 2018 01:06:17 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14389287DA for ; Wed, 24 Jan 2018 01:06:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932430AbeAXBGQ (ORCPT ); Tue, 23 Jan 2018 20:06:16 -0500 Received: from gateway30.websitewelcome.com ([192.185.194.16]:43101 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932083AbeAXBGP (ORCPT ); Tue, 23 Jan 2018 20:06:15 -0500 X-Greylist: delayed 1353 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Jan 2018 20:06:15 EST Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 690CF6DE2 for ; Tue, 23 Jan 2018 18:43:41 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id e9ADeWw3X0aRHe9ADetjZH; Tue, 23 Jan 2018 18:43:41 -0600 Received: from [189.175.13.235] (port=37896 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1ee9AC-00194r-RV; Tue, 23 Jan 2018 18:43:40 -0600 Date: Tue, 23 Jan 2018 18:43:40 -0600 From: "Gustavo A. R. Silva" To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Arnd Bergmann Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR Message-ID: <20180124004340.GA25212@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.13.235 X-Source-L: No X-Exim-ID: 1ee9AC-00194r-RV X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.175.13.235]:37896 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 6 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch. This issue was detected with the help of Coccinelle. Fixes: 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage") Signed-off-by: Gustavo A. R. Silva Acked-by: Steve Longerbeam Acked-by: Arnd Bergmann --- drivers/staging/media/imx/imx-media-vdic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c index 433474d..ed35684 100644 --- a/drivers/staging/media/imx/imx-media-vdic.c +++ b/drivers/staging/media/imx/imx-media-vdic.c @@ -177,7 +177,7 @@ static int vdic_get_ipu_resources(struct vdic_priv *priv) priv->vdi_in_ch = ch; ch = ipu_idmac_get(priv->ipu, IPUV3_CHANNEL_MEM_VDI_NEXT); - if (IS_ERR(priv->vdi_in_ch_n)) { + if (IS_ERR(ch)) { err_chan = IPUV3_CHANNEL_MEM_VDI_NEXT; ret = PTR_ERR(ch); goto out_err_chan;