]> git.baikalelectronics.ru Git - kernel.git/commit
clk: ti: fix ti_clk_get_reg_addr error handling
authorTero Kristo <t-kristo@ti.com>
Mon, 23 Feb 2015 19:06:08 +0000 (21:06 +0200)
committerTero Kristo <t-kristo@ti.com>
Tue, 24 Mar 2015 18:23:36 +0000 (20:23 +0200)
commitcf23bd36de22524899c6446b0424964719e973f6
treea1479d6552f50ed68c66a25cc4860b8f68c21bfa
parentb7d65746744b343701de14ca433982a3229390be
clk: ti: fix ti_clk_get_reg_addr error handling

There is a case where NULL can be a valid return value for
ti_clk_get_reg_addr, specifically the case where both the provider index
and register offsets are zero. In this case, the current error checking
against a NULL pointer will fail. Thus, change the API to return a
ERR_PTR value in an error case, and change all the users of this API to
check against IS_ERR instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Michael Turquette <mturquette@linaro.org>
drivers/clk/ti/apll.c
drivers/clk/ti/autoidle.c
drivers/clk/ti/clk.c
drivers/clk/ti/divider.c
drivers/clk/ti/dpll.c
drivers/clk/ti/gate.c
drivers/clk/ti/interface.c
drivers/clk/ti/mux.c