X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fata%2Fsata_dwc_460ex.c;h=f0ef844428bb4dd794c985ef8fcb8706c1bde070;hb=fd531024bad7e5799e968ca70c0d3ca7b96b71ef;hp=9dcef6ac643b95b5155edd07b4823bf16d321850;hpb=2ef459167adb5d7cf76df403b4fcf79347056824;p=linux-2.6-microblaze.git diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 9dcef6ac643b..f0ef844428bb 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -543,6 +543,11 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance) hsdev->sactive_issued |= qcmd_tag_to_mask(tag); qc = ata_qc_from_tag(ap, tag); + if (unlikely(!qc)) { + dev_err(ap->dev, "failed to get qc"); + handled = 1; + goto DONE; + } /* * Start FP DMA for NCQ command. At this point the tag is the * active tag. It is the tag that matches the command about to @@ -658,6 +663,11 @@ DRVSTILLBUSY: tag_mask &= (~0x00000001); qc = ata_qc_from_tag(ap, tag); + if (unlikely(!qc)) { + dev_err(ap->dev, "failed to get qc"); + handled = 1; + goto DONE; + } /* To be picked up by completion functions */ qc->ap->link.active_tag = tag;