mmc: pxamci: Fix another error handling path in pxamci_probe()

commit b886f54c300d31c109d2e4336b22922b64e7ba7d upstream.

The commit in Fixes: has introduced an new error handling without branching
to the existing error handling path.

Update it now and release some resources if pxamci_init_ocr() fails.

Fixes: 61951fd6cb ("mmc: pxamci: let mmc core handle regulators")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/07a2dcebf8ede69b484103de8f9df043f158cffd.1658862932.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christophe JAILLET 2022-07-26 21:15:51 +02:00 committed by Greg Kroah-Hartman
parent b1b2b8adb0
commit 6db5285844

View File

@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev)
ret = pxamci_init_ocr(host); ret = pxamci_init_ocr(host);
if (ret < 0) if (ret < 0)
return ret; goto out;
mmc->caps = 0; mmc->caps = 0;
host->cmdat = 0; host->cmdat = 0;