diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-12-07 01:00:19 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-12-12 10:59:09 -0500 |
commit | 7d6203af30b45bb1506e20935a270286c3e2393f (patch) | |
tree | e5046d82c226d2b1804242f9bd7defdb258ac6c2 /drivers/ata | |
parent | ee4e5a9abf470908bb04feadec236c51e19fc413 (diff) |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci_imx.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
331 | if (IS_ERR(imxpriv->gpr)) { | 331 | if (IS_ERR(imxpriv->gpr)) { |
332 | dev_err(dev, | 332 | dev_err(dev, |
333 | "failed to find fsl,imx6q-iomux-gpr regmap\n"); | 333 | "failed to find fsl,imx6q-iomux-gpr regmap\n"); |
334 | return PTR_ERR(imxpriv->gpr); | 334 | ret = PTR_ERR(imxpriv->gpr); |
335 | goto err_out; | ||
335 | } | 336 | } |
336 | 337 | ||
337 | /* | 338 | /* |