Skip to content

Commit

Permalink
drm: Use PTR_ERR_OR_ZERO in drm_fb_cma_fbdev_init()
Browse files Browse the repository at this point in the history
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1539176563-144779-1-git-send-email-yuehaibing@huawei.com
  • Loading branch information
YueHaibing authored and Daniel Vetter committed Oct 11, 2018
1 parent 49c5c07 commit 2a7be4b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/drm_fb_cma_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int preferred_bpp,

/* dev->fb_helper will indirectly point to fbdev_cma after this call */
fbdev_cma = drm_fbdev_cma_init(dev, preferred_bpp, max_conn_count);
if (IS_ERR(fbdev_cma))
return PTR_ERR(fbdev_cma);

return 0;
return PTR_ERR_OR_ZERO(fbdev_cma);
}
EXPORT_SYMBOL_GPL(drm_fb_cma_fbdev_init);

Expand Down

0 comments on commit 2a7be4b

Please sign in to comment.