Skip to contentSkip to conversation

drm_rmmap_ioctl(): remove dead code

PATCH New Adrian Bunk 1 participant 1 message Jul 23, 2007 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm_rmmap_ioctl(): remove dead code

This patch removes some obviously dead code spotted by the Coverity checker.

---

drivers/char/drm/drm_bufs.c renamed from drivers/char/drm/drm_bufs.c.old +0 -5
@@ -476,15 +476,10 @@ int drm_rmmap_ioctl(struct inode *inode,
 	if (list_empty(&dev->maplist) || !map) {
 		mutex_unlock(&dev->struct_mutex);
 		return -EINVAL;
 	}
 
-	if (!map) {
-		mutex_unlock(&dev->struct_mutex);
-		return -EINVAL;
-	}
-
 	/* Register and framebuffer maps are permanent */
 	if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) {
 		mutex_unlock(&dev->struct_mutex);
 		return 0;
 	}