cdrom: information leak in cdrom_ioctl_media_changed()
[pandora-kernel.git] / drivers / cdrom / cdrom.c
index 1331740..3792f5c 100644 (file)
@@ -873,6 +873,7 @@ static int cdrom_is_dvd_rw(struct cdrom_device_info *cdi)
        switch (cdi->mmc3_profile) {
        case 0x12:      /* DVD-RAM      */
        case 0x1A:      /* DVD+RW       */
+       case 0x43:      /* BD-RE        */
                return 0;
        default:
                return 1;
@@ -2341,7 +2342,7 @@ static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,
        if (!CDROM_CAN(CDC_SELECT_DISC) || arg == CDSL_CURRENT)
                return media_changed(cdi, 1);
 
-       if ((unsigned int)arg >= cdi->capacity)
+       if (arg >= cdi->capacity)
                return -EINVAL;
 
        info = kmalloc(sizeof(*info), GFP_KERNEL);