aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-12 19:41:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-12 19:41:27 -0500
commit57ddd5c1803859d977c5a31a267d2c805ffe6e11 (patch)
treebbc3e2a406f5ab2ddeb0ba0273867bee95b41612 /drivers
parent7cafae52381395d24b83996eca7a7b53ab6a8827 (diff)
parented071adc97a69785686a37fb88e100f41b482b94 (diff)
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: [PATCH] ahci: fix NULL pointer dereference detected by Coverity
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ahci.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index a800fb51168b..559ff7aae3f1 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -742,23 +742,17 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
742 struct ata_queued_cmd *qc; 742 struct ata_queued_cmd *qc;
743 qc = ata_qc_from_tag(ap, ap->active_tag); 743 qc = ata_qc_from_tag(ap, ap->active_tag);
744 if (!ahci_host_intr(ap, qc)) 744 if (!ahci_host_intr(ap, qc))
745 if (ata_ratelimit()) { 745 if (ata_ratelimit())
746 struct pci_dev *pdev = 746 dev_printk(KERN_WARNING, host_set->dev,
747 to_pci_dev(ap->host_set->dev);
748 dev_printk(KERN_WARNING, &pdev->dev,
749 "unhandled interrupt on port %u\n", 747 "unhandled interrupt on port %u\n",
750 i); 748 i);
751 }
752 749
753 VPRINTK("port %u\n", i); 750 VPRINTK("port %u\n", i);
754 } else { 751 } else {
755 VPRINTK("port %u (no irq)\n", i); 752 VPRINTK("port %u (no irq)\n", i);
756 if (ata_ratelimit()) { 753 if (ata_ratelimit())
757 struct pci_dev *pdev = 754 dev_printk(KERN_WARNING, host_set->dev,
758 to_pci_dev(ap->host_set->dev);
759 dev_printk(KERN_WARNING, &pdev->dev,
760 "interrupt on disabled port %u\n", i); 755 "interrupt on disabled port %u\n", i);
761 }
762 } 756 }
763 757
764 irq_ack |= (1 << i); 758 irq_ack |= (1 << i);