Skip to content

Commit

Permalink
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
Linus Torvalds committed Mar 13, 2006
2 parents 7cafae5 + ed071ad commit 57ddd5c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,23 +742,17 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->active_tag);
if (!ahci_host_intr(ap, qc))
if (ata_ratelimit()) {
struct pci_dev *pdev =
to_pci_dev(ap->host_set->dev);
dev_printk(KERN_WARNING, &pdev->dev,
if (ata_ratelimit())
dev_printk(KERN_WARNING, host_set->dev,
"unhandled interrupt on port %u\n",
i);
}

VPRINTK("port %u\n", i);
} else {
VPRINTK("port %u (no irq)\n", i);
if (ata_ratelimit()) {
struct pci_dev *pdev =
to_pci_dev(ap->host_set->dev);
dev_printk(KERN_WARNING, &pdev->dev,
if (ata_ratelimit())
dev_printk(KERN_WARNING, host_set->dev,
"interrupt on disabled port %u\n", i);
}
}

irq_ack |= (1 << i);
Expand Down

0 comments on commit 57ddd5c

Please sign in to comment.