Dont call dma->free unless dma is there.
Spotted by: Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
parent
a80cc4e104
commit
394046e66f
@ -148,7 +148,8 @@ atapi_detach(struct ata_device *atadev)
|
||||
}
|
||||
free(request, M_ATAPI);
|
||||
}
|
||||
atadev->channel->dma->free(atadev);
|
||||
if (atadev->channel->dma)
|
||||
atadev->channel->dma->free(atadev);
|
||||
free(atadev->result, M_ATAPI);
|
||||
atadev->driver = NULL;
|
||||
atadev->flags = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user