From: Wei Yongjun Date: Sat, 7 Dec 2013 06:00:19 +0000 (+0800) Subject: ahci: imx: fix the error handling in imx_ahci_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7d6203af30b45bb1506e20935a270286c3e2393f;p=linux-beck.git ahci: imx: fix the error handling in imx_ahci_probe() Release alloced resources instead of direct return from imx_ahci_probe() in the error handling case. Fixes: 4a23d1793f8e ('ahci: imx: Add i.MX53 support') Signed-off-by: Wei Yongjun Signed-off-by: Tejun Heo Acked-by: Marek Vasut --- diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 2daa28891b7f..dd4d6f74d7bd 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -331,7 +331,8 @@ static int imx_ahci_probe(struct platform_device *pdev) if (IS_ERR(imxpriv->gpr)) { dev_err(dev, "failed to find fsl,imx6q-iomux-gpr regmap\n"); - return PTR_ERR(imxpriv->gpr); + ret = PTR_ERR(imxpriv->gpr); + goto err_out; } /*