提交 8f1cc233 编写于 作者: M Mike Frysinger 提交者: Bryan Wu

Blackfin arch: set_dma_callback: do not store .irq

set_dma_callback: do not store .irq if request_irq() failed so we dont
turn around and attempt to free_irq() it later on in free_dma()
Signed-off-by: NMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: NBryan Wu <cooloney@kernel.org>
上级 9b011407
......@@ -157,18 +157,16 @@ int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data)
&& channel < MAX_DMA_CHANNELS));
if (callback != NULL) {
int ret_val;
dma_ch[channel].irq = channel2irq(channel);
dma_ch[channel].data = data;
int ret;
unsigned int irq = channel2irq(channel);
ret_val =
request_irq(dma_ch[channel].irq, callback, IRQF_DISABLED,
dma_ch[channel].device_id, data);
if (ret_val) {
printk(KERN_NOTICE
"Request irq in DMA engine failed.\n");
return -EPERM;
}
ret = request_irq(irq, callback, IRQF_DISABLED,
dma_ch[channel].device_id, data);
if (ret)
return ret;
dma_ch[channel].irq = irq;
dma_ch[channel].data = data;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册