aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_imx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_imx.c')
-rw-r--r--drivers/ata/pata_imx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 26386f0b89a8..b0b18ec5465f 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -119,7 +119,9 @@ static int pata_imx_probe(struct platform_device *pdev)
119 return PTR_ERR(priv->clk); 119 return PTR_ERR(priv->clk);
120 } 120 }
121 121
122 clk_prepare_enable(priv->clk); 122 ret = clk_prepare_enable(priv->clk);
123 if (ret)
124 return ret;
123 125
124 host = ata_host_alloc(&pdev->dev, 1); 126 host = ata_host_alloc(&pdev->dev, 1);
125 if (!host) { 127 if (!host) {
@@ -212,7 +214,9 @@ static int pata_imx_resume(struct device *dev)
212 struct ata_host *host = dev_get_drvdata(dev); 214 struct ata_host *host = dev_get_drvdata(dev);
213 struct pata_imx_priv *priv = host->private_data; 215 struct pata_imx_priv *priv = host->private_data;
214 216
215 clk_prepare_enable(priv->clk); 217 int ret = clk_prepare_enable(priv->clk);
218 if (ret)
219 return ret;
216 220
217 __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); 221 __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
218 222