]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: omap-sham - Only release DMA channel if successfully requested
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 12 Nov 2013 20:12:27 +0000 (13:12 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 5 Dec 2013 13:28:40 +0000 (21:28 +0800)
commit0c33c2ae33b4ce572d70abc8c215681530ada826
tree3a896286d5dd810755b2534ae40c21566f080a22
parent014cb2e725c74160f414cbcbaeba4f55728a5c7b
crypto: omap-sham - Only release DMA channel if successfully requested

In omap_sham_probe() and omap_sham_remove(), 'dd->dma_lch'
is released without checking to see if it was successfully
requested or not.  This is a bug and was identified and
reported by Dan Carpenter here:

http://www.spinics.net/lists/devicetree/msg11023.html

Add code to only release 'dd->dma_lch' when its not NULL
(that is, when it was successfully requested).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Joel Fernandes <joelf@ti.com>
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c