diff mbox series

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

Message ID X9NEfmgGilaXJs2R@mwanda (mailing list archive)
State New, archived
Headers show
Series drm/panel: khadas: Fix error code in khadas_ts050_panel_add() | expand

Commit Message

Dan Carpenter Dec. 11, 2020, 10:05 a.m. UTC
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")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/panel/panel-khadas-ts050.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sam Ravnborg Dec. 11, 2020, 11:01 a.m. UTC | #1
Hi Dan,

I assume your nice tooling found this buggy.
Nice!

On Fri, Dec 11, 2020 at 01:05:50PM +0300, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

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

	Sam
Dan Carpenter Dec. 11, 2020, 2:04 p.m. UTC | #2
On Fri, Dec 11, 2020 at 12:01:57PM +0100, Sam Ravnborg wrote:
> Hi Dan,
> 
> I assume your nice tooling found this buggy.

Yeah.  Passing a valid pointer to PTR_ERR().

regards,
dan carpenter
Neil Armstrong Dec. 11, 2020, 4:01 p.m. UTC | #3
Hi All,

On 11/12/2020 12:01, Sam Ravnborg wrote:
> Hi Dan,
> 
> I assume your nice tooling found this buggy.
> Nice!
> 
> On Fri, Dec 11, 2020 at 01:05:50PM +0300, Dan Carpenter wrote:
>> 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")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for the fix !

> 
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> 
> 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

> 
> 	Sam
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-khadas-ts050.c b/drivers/gpu/drm/panel/panel-khadas-ts050.c
index 87aa2cc8ec2a..8f6ac1a40c31 100644
--- a/drivers/gpu/drm/panel/panel-khadas-ts050.c
+++ b/drivers/gpu/drm/panel/panel-khadas-ts050.c
@@ -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,