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@xxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html