clk: sunxi: Fix of_io_request_and_map error check
commit5ac382c311fc12ccfb74832afe545ce8c38cc459
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Sat, 2 May 2015 15:03:22 +0000 (2 17:03 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 5 May 2015 15:43:57 +0000 (5 17:43 +0200)
tree6f7c3a313d5c6691b06351e938f00fbd81e1789f
parentb787f68c36d49bb1d9236f403813641efa74a031
clk: sunxi: Fix of_io_request_and_map error check

of_io_request_and map returns an error pointer, but the current code assumes
that on error the returned pointer will be NULL.

Obviously, that makes the check completely useless. Change the test to actually
check for the proper error code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
drivers/clk/sunxi/clk-sun9i-core.c
drivers/clk/sunxi/clk-sunxi.c