Commit 568b4933 authored by Wang Chen's avatar Wang Chen Committed by David S. Miller

irda: via-ircc proper dma freeing

1. dma should be freed when dma2 request fail.
2. dma2 should be freed too when device close.
Signed-off-by: default avatarWang Chen <>
Signed-off-by: default avatarSamuel Ortiz <>
Signed-off-by: default avatarDavid S. Miller <>
parent 3888e9ef
......@@ -1546,6 +1546,7 @@ static int via_ircc_net_open(struct net_device *dev)
IRDA_WARNING("%s, unable to allocate dma2=%d\n",
driver_name, self->io.dma2);
free_irq(self->io.irq, self);
return -EAGAIN;
......@@ -1606,6 +1607,8 @@ static int via_ircc_net_close(struct net_device *dev)
EnAllInt(iobase, OFF);
free_irq(self->io.irq, dev);
if (self->io.dma2 != self->io.dma)
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment