mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
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: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3888e9efc9
commit
568b4933a9
@ -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);
|
||||
free_dma(self->io.dma);
|
||||
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);
|
||||
free_dma(self->io.dma);
|
||||
if (self->io.dma2 != self->io.dma)
|
||||
free_dma(self->io.dma2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user