]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: pwrseq_simple: fix error path in mmc_pwrseq_simple_alloc
authorNeilBrown <neil@brown.name>
Sat, 21 Feb 2015 04:15:16 +0000 (15:15 +1100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 19 Mar 2015 10:26:35 +0000 (11:26 +0100)
commit1a9b79ffd1195b892fe0108b08e5cbfc75130e6c
tree6c360e11c15c73fa8ebb50446b7e95589a7cabfe
parent4e813428b23f3210ec3696d8097c405444662f99
mmc: pwrseq_simple: fix error path in mmc_pwrseq_simple_alloc

The current error-path code (when gpiod_get_index() reports
an error) can never free pwrseq->reset_gpios[0], but might
try to tree pwrseq->reset_gpios[-1], which has unfortunate
consequences.

Signed-off-by: NeilBrown <neil@brown.name>
Fixes: ba948dffa7adc073424fa597553057562694589c
Acked-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
drivers/mmc/core/pwrseq_simple.c