From: kbuild test robot <fengguang.wu@xxxxxxxxx> 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 <fengguang.wu@xxxxxxxxx> Signed-off-by: linux-kernel@xxxxxxxxxxxxxxx --- 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;