drm: checking the wrong variable in savage_do_init_bci()
Subsystems (3)
PATCH 1/1 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.
drivers/gpu/drm/savage/savage_bci.c +1 -1
@@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)return -EINVAL ; }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" );savage_do_cleanup_bci (dev);return -ENOMEM ;
Am 17.05.2012 09:09, schrieb Dan Carpenter:
Quoted 10 lines
drm_core_ioremap()initializes ->handle. We already know "dev->agp_buffer_map" is a valid pointer.Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/savage/savage_bci.c +0
-0
drivers/gpu/drm/savage/savage_bci.c static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) · line 741
Quoted 8 lines
drivers/gpu/drm/savage/savage_bci.c +1
-1@@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)return -EINVAL ; }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" );savage_do_cleanup_bci (dev);return -ENOMEM ;
ok, the interface asks for that type of error :)
re,
wh
Quoted 4 lines · Dan Carpenter
drm_core_ioremap()initializes ->handle. We already know "dev->agp_buffer_map" is a valid pointer.Signed-off-by Dan Carpenter<[email protected]>
I'm surprised that has never been hit.
Quoted 19 lines
drivers/gpu/drm/savage/savage_bci.c +1
-1@@ -735,7 +735,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)return -EINVAL ; }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" );savage_do_cleanup_bci (dev);return -ENOMEM ;_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel