From patchwork Fri May 25 14:29:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10427575 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 C1F586025B for ; Fri, 25 May 2018 14:29:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0E8129739 for ; Fri, 25 May 2018 14:29:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A57A92973F; Fri, 25 May 2018 14:29:58 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0505A2973B for ; Fri, 25 May 2018 14:29:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B28E6E941; Fri, 25 May 2018 14:29:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41A0A6E941 for ; Fri, 25 May 2018 14:29:53 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.49,440,1520895600"; d="scan'208";a="266468150" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2018 16:29:51 +0200 Date: Fri, 25 May 2018 16:29:50 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Gerd Hoffmann Subject: [PATCH] udmabuf: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, kbuild-all@01.org, linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/dma-buf/udmabuf.c:167:6-12: inconsistent IS_ERR and PTR_ERR on line 168. PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: cc2d0e91bc15 ("udmabuf: driver update") Signed-off-by: kbuild test robot Signed-off-by: linux-kernel@vger.kernel.org --- tree: git://git.kraxel.org/linux udmabuf head: cc2d0e91bc15849baff695d175bfb8fba35f1465 commit: cc2d0e91bc15849baff695d175bfb8fba35f1465 [6/6] udmabuf: driver update udmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -165,7 +165,7 @@ static long udmabuf_ioctl_create(struct page = shmem_read_mapping_page( file_inode(ubuf->filp)->i_mapping, pgoff + pgidx); if (IS_ERR(page)) { - ret = PTR_ERR(buf); + ret = PTR_ERR(page); goto err_put_pages; } ubuf->pages[pgidx] = page;