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>
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;
}
/*