]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: Return errors from clk providers in __of_clk_get_from_provider()
authorStephen Boyd <sboyd@codeaurora.org>
Mon, 15 Aug 2016 21:32:23 +0000 (14:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 11:02:12 +0000 (05:02 -0600)
commit47e14015b33ca41f6ec233e0bc425954ee81f7e6
tree77f83215e0775a6922c0f6083b23debde4a0a97d
parent40213c827c91f7fe9ff4f04c722cbb425ccda594
clk: Return errors from clk providers in __of_clk_get_from_provider()

commit f155d15b64e36b45ca89e3521fe0c1ccad5e5ff0 upstream.

Before commit 0861e5b8cf80 (clk: Add clk_hw OF clk providers,
2016-02-05) __of_clk_get_from_provider() would return an error
pointer of the provider's choosing if there was a provider
registered and EPROBE_DEFER otherwise. After that commit, it
would return EPROBE_DEFER regardless of whether or not the
provider returned an error. This is odd and can lead to behavior
where clk consumers keep probe deferring when they should be
seeing some other error.

Let's restore the previous behavior where we only return
EPROBE_DEFER when there isn't a provider in our of_clk_providers
list. Otherwise, return the error from the last provider we find
that matches the node.

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Fixes: 0861e5b8cf80 ("clk: Add clk_hw OF clk providers")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/clk.c