drm/sun41: Fix incorrect return type

Submitted by Sean Paul on July 12, 2018, 3:50 p.m.

Details

Message ID 20180712155037.211625-1-seanpaul@chromium.org
State New
Headers show
Series "drm/sun41: Fix incorrect return type" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Sean Paul July 12, 2018, 3:50 p.m.
We're returning -errno instead of ERR_PTR(-errno).

Fixes: af11942ee44e ("drm/sun4i: tcon-top: Cleanup clock handling")
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
index 046f8dd66f90..55fe398d8290 100644
--- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
@@ -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);
 	if (index < 0)
-		return index;
+		return ERR_PTR(index);
 
 	parent_name = of_clk_get_parent_name(dev->of_node, index);
 

Comments

Hi Sean,

On Thu, Jul 12, 2018 at 11:50:28AM -0400, Sean Paul wrote:
> We're returning -errno instead of ERR_PTR(-errno).
> 
> Fixes: af11942ee44e ("drm/sun4i: tcon-top: Cleanup clock handling")
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Jernej Skrabec <jernej.skrabec@siol.net>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

I merged a similar patch yesterday, the warning should be gone now.

Thanks!
Maxime