]> git.baikalelectronics.ru Git - kernel.git/commit
net: ti: cpmac: Use the correct function to free some resources.
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 17 Jul 2016 06:15:50 +0000 (08:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jul 2016 18:30:26 +0000 (11:30 -0700)
commit1418a08c3dfa20a7f8af022f4f159d2780becdbb
treed1a2e997158f55d4b2baf58bf3cdf81614d9c37b
parentbadf693ed8f9c2455156a2d2f3ed4f7a668da1b6
net: ti: cpmac: Use the correct function to free some resources.

In 'cpmac_open', 'dma_alloc_coherent' has been used to allocate some
resources, so we need to free them using 'dma_free_coherent' instead
of 'kfree'.

Also, we don't need to free these resources if the allocation has failed.
So I have slighly modified the goto label in this case.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpmac.c