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: 10427577 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 0B1FF6025B for ; Fri, 25 May 2018 14:30:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E45F329772 for ; Fri, 25 May 2018 14:30:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E088029783; Fri, 25 May 2018 14:30:08 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 75FFB29746 for ; Fri, 25 May 2018 14:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936184AbeEYO3x (ORCPT ); Fri, 25 May 2018 10:29:53 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:43808 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936050AbeEYO3x (ORCPT ); Fri, 25 May 2018 10:29:53 -0400 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 cc: kbuild-all@01.org, linux-media@vger.kernel.org, Sumit Semwal , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org 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 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 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;