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>
Showing
- drivers/clk/ti/apll.c 3 additions, 2 deletionsdrivers/clk/ti/apll.c
- drivers/clk/ti/autoidle.c 1 addition, 1 deletiondrivers/clk/ti/autoidle.c
- drivers/clk/ti/clk.c 4 additions, 3 deletionsdrivers/clk/ti/clk.c
- drivers/clk/ti/divider.c 2 additions, 2 deletionsdrivers/clk/ti/divider.c
- drivers/clk/ti/dpll.c 3 additions, 3 deletionsdrivers/clk/ti/dpll.c
- drivers/clk/ti/gate.c 2 additions, 2 deletionsdrivers/clk/ti/gate.c
- drivers/clk/ti/interface.c 1 addition, 1 deletiondrivers/clk/ti/interface.c
- drivers/clk/ti/mux.c 2 additions, 2 deletionsdrivers/clk/ti/mux.c
Loading
Please register or sign in to comment