OSDN Git Service

staging: mt7621-mmc: Fix bug on dma_alloc_coherent fail
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Wed, 4 Apr 2018 20:15:36 +0000 (22:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:34:03 +0000 (15:34 +0200)
commit36ff37c6ca7b2fb21079f4ce2353260ee3f7fa8b
tree98f92e0a937c67423a4283149582151d887228f9
parentd6e9e06861bdd9c57d539578bb7bd2cdd929e638
staging: mt7621-mmc: Fix bug on dma_alloc_coherent fail

In case of dma_alloc_coherent failing the current code just called
BUG_ON. By adding error handling for that case this can be avoided.
This also fixes a memory leek in case of a fail later on in the probe
function.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c