diff options
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r-- | drivers/cdrom/cdrom.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 2df5cf4ec743..e4a2f8f3a1d7 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1810,7 +1810,7 @@ static int dvd_read_disckey(struct cdrom_device_info *cdi, dvd_struct *s) | |||
1810 | 1810 | ||
1811 | size = sizeof(s->disckey.value) + 4; | 1811 | size = sizeof(s->disckey.value) + 4; |
1812 | 1812 | ||
1813 | if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL) | 1813 | if ((buf = kmalloc(size, GFP_KERNEL)) == NULL) |
1814 | return -ENOMEM; | 1814 | return -ENOMEM; |
1815 | 1815 | ||
1816 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); | 1816 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); |
@@ -1861,7 +1861,7 @@ static int dvd_read_manufact(struct cdrom_device_info *cdi, dvd_struct *s) | |||
1861 | 1861 | ||
1862 | size = sizeof(s->manufact.value) + 4; | 1862 | size = sizeof(s->manufact.value) + 4; |
1863 | 1863 | ||
1864 | if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL) | 1864 | if ((buf = kmalloc(size, GFP_KERNEL)) == NULL) |
1865 | return -ENOMEM; | 1865 | return -ENOMEM; |
1866 | 1866 | ||
1867 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); | 1867 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); |
@@ -2849,7 +2849,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | |||
2849 | /* FIXME: we need upper bound checking, too!! */ | 2849 | /* FIXME: we need upper bound checking, too!! */ |
2850 | if (lba < 0) | 2850 | if (lba < 0) |
2851 | return -EINVAL; | 2851 | return -EINVAL; |
2852 | cgc.buffer = (char *) kmalloc(blocksize, GFP_KERNEL); | 2852 | cgc.buffer = kmalloc(blocksize, GFP_KERNEL); |
2853 | if (cgc.buffer == NULL) | 2853 | if (cgc.buffer == NULL) |
2854 | return -ENOMEM; | 2854 | return -ENOMEM; |
2855 | memset(&sense, 0, sizeof(sense)); | 2855 | memset(&sense, 0, sizeof(sense)); |
@@ -3031,7 +3031,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | |||
3031 | int size = sizeof(dvd_struct); | 3031 | int size = sizeof(dvd_struct); |
3032 | if (!CDROM_CAN(CDC_DVD)) | 3032 | if (!CDROM_CAN(CDC_DVD)) |
3033 | return -ENOSYS; | 3033 | return -ENOSYS; |
3034 | if ((s = (dvd_struct *) kmalloc(size, GFP_KERNEL)) == NULL) | 3034 | if ((s = kmalloc(size, GFP_KERNEL)) == NULL) |
3035 | return -ENOMEM; | 3035 | return -ENOMEM; |
3036 | cdinfo(CD_DO_IOCTL, "entering DVD_READ_STRUCT\n"); | 3036 | cdinfo(CD_DO_IOCTL, "entering DVD_READ_STRUCT\n"); |
3037 | if (copy_from_user(s, (dvd_struct __user *)arg, size)) { | 3037 | if (copy_from_user(s, (dvd_struct __user *)arg, size)) { |