Open
Description
If dma_request_chan fails (eg if you have a receive only DMA controller but used channel 0 for Rx rather than 1) then the check for NULL will pass but the driver will later cause a page fault dereferencing the result.
The check should be:
pchannel_p->channel_p = dma_request_chan(&pdev->dev, name);
if (IS_ERR(pchannel_p->channel_p)) {
dev_err(pchannel_p->dma_device_p, "DMA channel request error: %d\n", PTR_ERR(pchannel_p->channel_p));
return ERROR;
}
Metadata
Metadata
Assignees
Labels
No labels