mmc: core: fix memory leak in mmc_add_host
authorWolfram Sang <w.sang@pengutronix.de>
Mon, 11 Apr 2011 04:11:29 +0000 (06:11 +0200)
committerChris Ball <cjb@laptop.org>
Wed, 25 May 2011 01:00:50 +0000 (21:00 -0400)
commitf317dfeb86c83d03304a74ce5426a69422b79547
treec5f313b1afcc4318c7d86dd243fb8867b01ffb05
parentb177bc9188c04e140e5d8928e88623a92ba751bf
mmc: core: fix memory leak in mmc_add_host

led_trigger_register_simple() allocates memory which must not be leaked
in the error-path of mmc_add_host. Move it past the only error-check in
the function.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/host.c