summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bochs
diff options
context:
space:
mode:
authorkbuild test robot <lkp@intel.com>2019-05-20 15:23:15 +0300
committerGerd Hoffmann <kraxel@redhat.com>2019-05-20 16:01:56 +0300
commit201bd433bfa36c8b1de3c71f59d04bf5b58adfd9 (patch)
tree50e77f47ce9299120e112d225fb3bc7b32a5b601 /drivers/gpu/drm/bochs
parentb0f986b4b025c8036ab2c660460621c1d17656b5 (diff)
downloadlinux-201bd433bfa36c8b1de3c71f59d04bf5b58adfd9.tar.xz
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: b3a25b9af80d ("drm/bochs: Convert bochs driver to VRAM MM") CC: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: kbuild test robot <lkp@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190520122314.GA155389@lkp-kbuild22 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r--drivers/gpu/drm/bochs/bochs_mm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
index cfb497140f6f..543499c07139 100644
--- a/drivers/gpu/drm/bochs/bochs_mm.c
+++ b/drivers/gpu/drm/bochs/bochs_mm.c
@@ -16,10 +16,7 @@ int bochs_mm_init(struct bochs_device *bochs)
vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base,
bochs->fb_size,
&drm_gem_vram_mm_funcs);
- if (IS_ERR(vmm))
- return PTR_ERR(vmm);
-
- return 0;
+ return PTR_ERR_OR_ZERO(vmm);
}
void bochs_mm_fini(struct bochs_device *bochs)