[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1374428498-14222-1-git-send-email-festevam@gmail.com>
Date: Sun, 21 Jul 2013 14:41:38 -0300
From: Fabio Estevam <festevam@...il.com>
To: herbert@...dor.apana.org.au
Cc: s.hauer@...gutronix.de, linux-kernel@...r.kernel.org,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH] hw_random: mxc-rnga: Check the return value from clk_prepare_enable()
From: Fabio Estevam <fabio.estevam@...escale.com>
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
drivers/char/hw_random/mxc-rnga.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index 19a12ac..6a86b6f 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -164,7 +164,9 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
goto out;
}
- clk_prepare_enable(mxc_rng->clk);
+ err = clk_prepare_enable(mxc_rng->clk);
+ if (err)
+ goto out;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists