]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit080b081c34a1dddf3ced551b7bca4a1d2e942041
treedfa478e3ecd35dc0cfac8b823c4f15de6bf45e4e
parentf51b0517e724aad85d2d3eac441423f7495eb95b
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