clk: Check for allocation errors in of_clk_init()
authorStephen Boyd <sboyd@codeaurora.org>
Mon, 6 Jul 2015 23:48:19 +0000 (16:48 -0700)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 8 Jul 2015 00:20:03 +0000 (17:20 -0700)
commit2e3b19f137f31290979999ff7ac67ce52e02be0e
tree5352ee3fb7599ee804129546b816522bd4c3caee
parentca7d07a22a28bcd558b200329bfa322c9ffd7c54
clk: Check for allocation errors in of_clk_init()

Dan Carpenter reports that we don't check the allocation here for
failure. Add a failure check and free any previously allocated
providers from the clk_provider_list.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c