Commit 838f6fe7 authored by Ben Skeggs's avatar Ben Skeggs

drm/nv50-/fb: use dma_mapping_error() to check dma_map_page() result

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9cba5efa
...@@ -253,8 +253,8 @@ nv50_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -253,8 +253,8 @@ nv50_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->r100c08 = dma_map_page(nv_device_base(device), priv->r100c08 = dma_map_page(nv_device_base(device),
priv->r100c08_page, 0, PAGE_SIZE, priv->r100c08_page, 0, PAGE_SIZE,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
if (!priv->r100c08) if (dma_mapping_error(nv_device_base(device), priv->r100c08))
nv_warn(priv, "failed 0x100c08 page map\n"); return -EFAULT;
} else { } else {
nv_warn(priv, "failed 0x100c08 page alloc\n"); nv_warn(priv, "failed 0x100c08 page alloc\n");
} }
......
...@@ -97,7 +97,7 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -97,7 +97,7 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->r100c10 = dma_map_page(nv_device_base(device), priv->r100c10 = dma_map_page(nv_device_base(device),
priv->r100c10_page, 0, PAGE_SIZE, priv->r100c10_page, 0, PAGE_SIZE,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
if (!priv->r100c10) if (dma_mapping_error(nv_device_base(device), priv->r100c10))
return -EFAULT; return -EFAULT;
} }
......
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