From: Christophe JAILLET Date: Tue, 26 Jul 2022 19:15:51 +0000 (+0200) Subject: mmc: pxamci: Fix another error handling path in pxamci_probe() X-Git-Tag: v4.19.256~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a24246304f5c9808959aabbc1b6ba1af6f7fe887;p=thirdparty%2Fkernel%2Fstable.git 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: 61951fd6cb49 ("mmc: pxamci: let mmc core handle regulators") Signed-off-by: Christophe JAILLET Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/07a2dcebf8ede69b484103de8f9df043f158cffd.1658862932.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 00b5465dfb0ce..ce0f1a6c27f76 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -677,7 +677,7 @@ static int pxamci_probe(struct platform_device *pdev) ret = pxamci_init_ocr(host); if (ret < 0) - return ret; + goto out; mmc->caps = 0; host->cmdat = 0;