args->size = args->pitch * args->height;
 
        obj = xen_drm_front_gem_create(dev, args->size);
-       if (IS_ERR_OR_NULL(obj)) {
-               ret = PTR_ERR_OR_ZERO(obj);
+       if (IS_ERR(obj)) {
+               ret = PTR_ERR(obj);
                goto fail;
        }
 
 
 
        size = round_up(size, PAGE_SIZE);
        xen_obj = gem_create_obj(dev, size);
-       if (IS_ERR_OR_NULL(xen_obj))
+       if (IS_ERR(xen_obj))
                return xen_obj;
 
        if (drm_info->front_info->cfg.be_alloc) {
         */
        xen_obj->num_pages = DIV_ROUND_UP(size, PAGE_SIZE);
        xen_obj->pages = drm_gem_get_pages(&xen_obj->base);
-       if (IS_ERR_OR_NULL(xen_obj->pages)) {
+       if (IS_ERR(xen_obj->pages)) {
                ret = PTR_ERR(xen_obj->pages);
                xen_obj->pages = NULL;
                goto fail;
        struct xen_gem_object *xen_obj;
 
        xen_obj = gem_create(dev, size);
-       if (IS_ERR_OR_NULL(xen_obj))
+       if (IS_ERR(xen_obj))
                return ERR_CAST(xen_obj);
 
        return &xen_obj->base;
 
        size = attach->dmabuf->size;
        xen_obj = gem_create_obj(dev, size);
-       if (IS_ERR_OR_NULL(xen_obj))
+       if (IS_ERR(xen_obj))
                return ERR_CAST(xen_obj);
 
        ret = gem_alloc_pages_array(xen_obj, size);