[PATCH 04/19] DSPBRIDGE: Now actually fail if a clk handle is wrong

Omar Ramirez Luna
2010-04-08T22:59:32Z

The value returned by clk_get on error is not NULL.

This checks if the value returned is an error or not.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
drivers/dsp/bridge/services/clk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dsp/bridge/services/clk.c b/drivers/dsp/bridge/services/clk.c
index 57cf6e3..74542c7 100644
--- a/drivers/dsp/bridge/services/clk.c
+++ b/drivers/dsp/bridge/services/clk.c
@@ -128,7 +128,7 @@ bool services_clk_init(void)
clk_handle = clk_get(&dspbridge_device.dev,
services_clks[i].clk_name);

- if (!clk_handle) {
+ if (IS_ERR(clk_handle)) {
pr_err("%s: failed to get clk handle %s, dev id = %d\n",
__func__, services_clks[i].clk_name,
services_clks[i].id);
--
1.6.2.4