Skip to contentSkip to conversation

drm/panel: khadas: Fix error code in khadas_ts050_panel_add()

PATCH In review Dan Carpenter 3 participants 4 messages Dec 11, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: khadas: Fix error code in khadas_ts050_panel_add()

There is a copy and paste bug so it didn't return the correct error code.

Fixes b215212117f7 ("drm: panel: add Khadas TS050 panel driver")
---
 drivers/gpu/drm/panel/panel-khadas-ts050.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-khadas-ts050.c +1 -1
index 87aa2cc8ec2a..8f6ac1a40c31 100644
@@ -786,7 +786,7 @@ static int khadas_ts050_panel_add(struct khadas_ts050_panel *khadas_ts050)
 	khadas_ts050->enable_gpio = devm_gpiod_get(dev, "enable",
 						   GPIOD_OUT_HIGH);
 	if (IS_ERR(khadas_ts050->enable_gpio))
-		return dev_err_probe(dev, PTR_ERR(khadas_ts050->reset_gpio),
+		return dev_err_probe(dev, PTR_ERR(khadas_ts050->enable_gpio),
 				     "failed to get enable gpio");
 
 	drm_panel_init(&khadas_ts050->base, &khadas_ts050->link->dev,
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Dan,

I assume your nice tooling found this buggy.
Nice!

Quoted 5 lines · Dan Carpenter

There is a copy and paste bug so it didn't return the correct error code.

Fixes b215212117f7 ("drm: panel: add Khadas TS050 panel driver")

Neil, I assume you will take this via next-fixes, which I think is the right tree at the moment.

Sam

#2 lore raw
Quoted 3 lines · Sam Ravnborg

Hi Dan,

I assume your nice tooling found this buggy.

Yeah. Passing a valid pointer to PTR_ERR().

regards,
dan carpenter

#3 lore raw
In reply to Sam Ravnborg

Hi All,

Quoted 11 lines · Sam Ravnborg

Hi Dan,

I assume your nice tooling found this buggy.
Nice!

Quoted 5 lines · Dan Carpenter

There is a copy and paste bug so it didn't return the correct error code.

Fixes b215212117f7 ("drm: panel: add Khadas TS050 panel driver")

Thanks for the fix !

Quoted 5 lines

Neil, I assume you will take this via next-fixes, which I think is the right tree at the moment.

Sure, but seems drm-misc-next-fixes is out of sync with drm-misc-next right now, I'll apply it when it's sync'ed back.

Neil

Quoted 3 lines

Sam