]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
libata: fix ata_dev_disable()
authorTejun Heo <htejun@gmail.com>
Mon, 25 Jun 2007 14:34:02 +0000 (23:34 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 27 Jun 2007 06:44:21 +0000 (02:44 -0400)
Fix silly condition check bug in ata_dev_disable().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index deda68446b437c15ff7fffb88794eaf417e3e2ea..642097a7d60dbf485f86d60b37ad0eb9e80aa94a 100644 (file)
@@ -600,8 +600,9 @@ static const char *sata_spd_string(unsigned int spd)
 
 void ata_dev_disable(struct ata_device *dev)
 {
-       if (ata_dev_enabled(dev) && ata_msg_drv(dev->ap)) {
-               ata_dev_printk(dev, KERN_WARNING, "disabled\n");
+       if (ata_dev_enabled(dev)) {
+               if (ata_msg_drv(dev->ap))
+                       ata_dev_printk(dev, KERN_WARNING, "disabled\n");
                ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 |
                                             ATA_DNXFER_QUIET);
                dev->class++;