staging: mt7621-mmc: Fix memory leek in case of error in probe
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Wed, 4 Apr 2018 20:15:33 +0000 (22:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:34:02 +0000 (15:34 +0200)
commit5ac36d9c9691d552fbd639271fbc24fa92ebe3ea
treedfa478e3ecd35dc0cfac8b823c4f15de6bf45e4e
parent9673d9f6f44bb40b6f821d66f65969d63a167479
staging: mt7621-mmc: Fix memory leek in case of error in probe

If the base address is not successfully obtained in the probe
function, then the mmc_host struct is not freed. Adding an exit for
that case fixes the bug.

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