提交 10f5ab04 编写于 作者: D Dan Carpenter 提交者: Dave Airlie

drm: checking the wrong variable in savage_do_init_bci()

drm_core_ioremap() initializes ->handle.  We already know
"dev->agp_buffer_map" is a valid pointer.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 0333592f
...@@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) ...@@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)
return -EINVAL; return -EINVAL;
} }
drm_core_ioremap(dev->agp_buffer_map, dev); drm_core_ioremap(dev->agp_buffer_map, dev);
if (!dev->agp_buffer_map) { if (!dev->agp_buffer_map->handle) {
DRM_ERROR("failed to ioremap DMA buffer region!\n"); DRM_ERROR("failed to ioremap DMA buffer region!\n");
savage_do_cleanup_bci(dev); savage_do_cleanup_bci(dev);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册