]> git.baikalelectronics.ru Git - kernel.git/commit
clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Wed, 13 May 2015 06:54:40 +0000 (15:54 +0900)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 14 May 2015 21:04:18 +0000 (14:04 -0700)
commit012cc616184f4ba3017247183f8c672f9f3964e3
tree085d0f8f92d6ed77b35f6d14f785b09b6eac1dc6
parent72f60565d9f878bf9be6370d9744af464bffb430
clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference

of_clk_get_from_provider() returns ERR_PTR on failure. The
dra7-atl-clock driver was not checking its return value and
immediately used it in __clk_get_hw().  __clk_get_hw()
dereferences supplied clock, if it is not NULL, so in that case
it would dereference an ERR_PTR.

Fixes: 8a2d7a83c0bc ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/ti/clk-dra7-atl.c