diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-13 03:41:27 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-13 03:41:27 +0300 |
commit | 57ddd5c1803859d977c5a31a267d2c805ffe6e11 (patch) | |
tree | bbc3e2a406f5ab2ddeb0ba0273867bee95b41612 /drivers | |
parent | 7cafae52381395d24b83996eca7a7b53ab6a8827 (diff) | |
parent | ed071adc97a69785686a37fb88e100f41b482b94 (diff) | |
download | linux-57ddd5c1803859d977c5a31a267d2c805ffe6e11.tar.xz |
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.c | 14 |
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 * 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); |