Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05017db3b3e0f0a294a38c38d7adb7d2c0c9844b
Commit:     05017db3b3e0f0a294a38c38d7adb7d2c0c9844b
Parent:     aa5dc8ebd9ef7521461b1b47ec918be841a21313
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 24 15:23:43 2007 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Dec 24 15:23:43 2007 +0100

    ide-cd: use ide_cd_release() in ide_cd_probe()
    
    Use ide_cd_release() to do the cleanup if ide_cdrom_setup() fails.
    
    It fixes:
    - the default drive->dsc_overlap value not being restored
    - the default drive->queue's prep_rq_fn not being restored
    - struct gendisk 'g' not being freed
    - wrong function name being reported on unregister_cdrom() error
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-cd.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 97ce584..599bb54 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -3507,15 +3507,8 @@ static int ide_cd_probe(ide_drive_t *drive)
        g->driverfs_dev = &drive->gendev;
        g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE;
        if (ide_cdrom_setup(drive)) {
-               struct cdrom_device_info *devinfo = &info->devinfo;
                ide_proc_unregister_driver(drive, &ide_cdrom_driver);
-               kfree(info->buffer);
-               kfree(info->toc);
-               kfree(info->changer_info);
-               if (devinfo->handle == drive && unregister_cdrom(devinfo))
-                       printk (KERN_ERR "%s: ide_cdrom_cleanup failed to 
unregister device from the cdrom driver.\n", drive->name);
-               kfree(info);
-               drive->driver_data = NULL;
+               ide_cd_release(&info->kref);
                goto failed;
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to