Commit 201bd433 authored by kbuild test robot's avatar kbuild test robot Committed by Gerd Hoffmann

drm/bochs: fix ptr_ret.cocci warnings

drivers/gpu/drm/bochs/bochs_mm.c:19: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: b3a25b9a ("drm/bochs: Convert bochs driver to VRAM MM")
CC: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarkbuild test robot <lkp@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190520122314.GA155389@lkp-kbuild22Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent b0f986b4
...@@ -16,10 +16,7 @@ int bochs_mm_init(struct bochs_device *bochs) ...@@ -16,10 +16,7 @@ int bochs_mm_init(struct bochs_device *bochs)
vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base, vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base,
bochs->fb_size, bochs->fb_size,
&drm_gem_vram_mm_funcs); &drm_gem_vram_mm_funcs);
if (IS_ERR(vmm)) return PTR_ERR_OR_ZERO(vmm);
return PTR_ERR(vmm);
return 0;
} }
void bochs_mm_fini(struct bochs_device *bochs) void bochs_mm_fini(struct bochs_device *bochs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment