Commit b7178ffe authored by Maxime Ripard's avatar Maxime Ripard

drm/sun4i: tcon-top: Fix return type warning

When commit af11942e ("drm/sun4i: tcon-top: Cleanup clock handling")
was merged, the error handling path of the of_property_match_string was
changed to take into account the fact that the returned value of that
function wasn't an error pointer but an error code.

Unfortunately, this introduced a warning since the now returned value is an
integer, while the sun8i_tcon_top_register_gate function should return an
error pointer.

Fix that by calling ERR_PTR.

Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Fixes: af11942e ("drm/sun4i: tcon-top: Cleanup clock handling")
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712080818.3571-1-maxime.ripard@bootlin.com
parent f88c5ee7
...@@ -99,7 +99,7 @@ static struct clk_hw *sun8i_tcon_top_register_gate(struct device *dev, ...@@ -99,7 +99,7 @@ static struct clk_hw *sun8i_tcon_top_register_gate(struct device *dev,
index = of_property_match_string(dev->of_node, "clock-names", parent); index = of_property_match_string(dev->of_node, "clock-names", parent);
if (index < 0) if (index < 0)
return index; return ERR_PTR(index);
parent_name = of_clk_get_parent_name(dev->of_node, index); parent_name = of_clk_get_parent_name(dev->of_node, index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment