aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/cdrom.c8
-rw-r--r--drivers/cdrom/cm206.c2
2 files changed, 5 insertions, 5 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)) {
diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c
index e6d8e9ededea..b6c61bbb20e1 100644
--- a/drivers/cdrom/cm206.c
+++ b/drivers/cdrom/cm206.c
@@ -1420,7 +1420,7 @@ int __init cm206_init(void)
1420 return -EIO; 1420 return -EIO;
1421 } 1421 }
1422 printk(" adapter at 0x%x", cm206_base); 1422 printk(" adapter at 0x%x", cm206_base);
1423 cd = (struct cm206_struct *) kmalloc(size, GFP_KERNEL); 1423 cd = kmalloc(size, GFP_KERNEL);
1424 if (!cd) 1424 if (!cd)
1425 goto out_base; 1425 goto out_base;
1426 /* Now we have found the adaptor card, try to reset it. As we have 1426 /* Now we have found the adaptor card, try to reset it. As we have