Commit e30ca4bc authored by Dan Carpenter's avatar Dan Carpenter Committed by Oleksandr Andrushchenko

drm/xen-front: checking for NULL instead of IS_ERR

drm_dev_alloc() returns error pointers, it never returns NULL.

Fixes: c575b7ee ("drm/xen-front: Add support for Xen PV display frontend")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180508092650.GA661@mwanda
parent 28eff786
......@@ -543,8 +543,8 @@ static int xen_drm_drv_init(struct xen_drm_front_info *front_info)
front_info->drm_info = drm_info;
drm_dev = drm_dev_alloc(&xen_drm_driver, dev);
if (!drm_dev) {
ret = -ENOMEM;
if (IS_ERR(drm_dev)) {
ret = PTR_ERR(drm_dev);
goto fail;
}
......
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