diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index 9ca57b8c4770..c8ae79dce699 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -357,7 +357,7 @@ ata_completed(void *context, int dummy) "\6MEDIA_CHANGED\5NID_NOT_FOUND" "\4MEDIA_CHANGE_REQEST" "\3ABORTED\2NO_MEDIA\1ILLEGAL_LENGTH"); - if ((request->flags & ATA_R_DMA) && + if ((request->flags & ATA_R_DMA) && request->dma && (request->dma->status & ATA_BMSTAT_ERROR)) printf(" dma=0x%02x", request->dma->status); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL)))