aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c18
-rw-r--r--drivers/ide/ide-probe.c6
-rw-r--r--drivers/ide/ide-taskfile.c6
-rw-r--r--drivers/ide/ide.c3
4 files changed, 11 insertions, 22 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 74d2ab0d901e..c2f47923d174 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -3292,12 +3292,9 @@ static void ide_cd_release(struct kref *kref)
3292 ide_drive_t *drive = info->drive; 3292 ide_drive_t *drive = info->drive;
3293 struct gendisk *g = info->disk; 3293 struct gendisk *g = info->disk;
3294 3294
3295 if (info->buffer != NULL) 3295 kfree(info->buffer);
3296 kfree(info->buffer); 3296 kfree(info->toc);
3297 if (info->toc != NULL) 3297 kfree(info->changer_info);
3298 kfree(info->toc);
3299 if (info->changer_info != NULL)
3300 kfree(info->changer_info);
3301 if (devinfo->handle == drive && unregister_cdrom(devinfo)) 3298 if (devinfo->handle == drive && unregister_cdrom(devinfo))
3302 printk(KERN_ERR "%s: %s failed to unregister device from the cdrom " 3299 printk(KERN_ERR "%s: %s failed to unregister device from the cdrom "
3303 "driver.\n", __FUNCTION__, drive->name); 3300 "driver.\n", __FUNCTION__, drive->name);
@@ -3487,12 +3484,9 @@ static int ide_cd_probe(struct device *dev)
3487 if (ide_cdrom_setup(drive)) { 3484 if (ide_cdrom_setup(drive)) {
3488 struct cdrom_device_info *devinfo = &info->devinfo; 3485 struct cdrom_device_info *devinfo = &info->devinfo;
3489 ide_unregister_subdriver(drive, &ide_cdrom_driver); 3486 ide_unregister_subdriver(drive, &ide_cdrom_driver);
3490 if (info->buffer != NULL) 3487 kfree(info->buffer);
3491 kfree(info->buffer); 3488 kfree(info->toc);
3492 if (info->toc != NULL) 3489 kfree(info->changer_info);
3493 kfree(info->toc);
3494 if (info->changer_info != NULL)
3495 kfree(info->changer_info);
3496 if (devinfo->handle == drive && unregister_cdrom(devinfo)) 3490 if (devinfo->handle == drive && unregister_cdrom(devinfo))
3497 printk (KERN_ERR "%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name); 3491 printk (KERN_ERR "%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name);
3498 kfree(info); 3492 kfree(info);
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index e6695e5df5bd..02167a5b751d 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1315,10 +1315,8 @@ static void drive_release_dev (struct device *dev)
1315 drive->devfs_name[0] = '\0'; 1315 drive->devfs_name[0] = '\0';
1316 } 1316 }
1317 ide_remove_drive_from_hwgroup(drive); 1317 ide_remove_drive_from_hwgroup(drive);
1318 if (drive->id != NULL) { 1318 kfree(drive->id);
1319 kfree(drive->id); 1319 drive->id = NULL;
1320 drive->id = NULL;
1321 }
1322 drive->present = 0; 1320 drive->present = 0;
1323 /* Messed up locking ... */ 1321 /* Messed up locking ... */
1324 spin_unlock_irq(&ide_lock); 1322 spin_unlock_irq(&ide_lock);
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 9c3b4f615621..7ec18fa3b5ff 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -646,10 +646,8 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
646 } 646 }
647abort: 647abort:
648 kfree(req_task); 648 kfree(req_task);
649 if (outbuf != NULL) 649 kfree(outbuf);
650 kfree(outbuf); 650 kfree(inbuf);
651 if (inbuf != NULL)
652 kfree(inbuf);
653 651
654// printk("IDE Taskfile ioctl ended. rc = %i\n", err); 652// printk("IDE Taskfile ioctl ended. rc = %i\n", err);
655 653
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 1bbf67882ae5..9fe19808d815 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -888,8 +888,7 @@ static int __ide_add_setting(ide_drive_t *drive, const char *name, int rw, int r
888 return 0; 888 return 0;
889abort: 889abort:
890 up(&ide_setting_sem); 890 up(&ide_setting_sem);
891 if (setting) 891 kfree(setting);
892 kfree(setting);
893 return -1; 892 return -1;
894} 893}
895 894