Skip to contentSkip to conversation

platform/x86: alienware-wmi: printing the wrong error code

PATCH In review Dan Carpenter 3 participants 3 messages Apr 24, 2019 – May 6, 2019

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

PATCH 1/1 platform/x86: alienware-wmi: printing the wrong error code

The "out_data" variable is uninitialized at the point. Originally, this used to print "status" instead and that seems like the correct thing to print.

Fixes bc2ef884320b ("alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status")
---
 drivers/platform/x86/alienware-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/alienware-wmi.c +1 -1
index c0d1555735cd..83fd7677af24 100644
@@ -587,7 +587,7 @@ static ssize_t show_hdmi_source(struct device *dev,
 			return scnprintf(buf, PAGE_SIZE,
 					 "input [gpu] unknown\n");
 	}
-	pr_err("alienware-wmi: unknown HDMI source status: %d\n", out_data);
+	pr_err("alienware-wmi: unknown HDMI source status: %u\n", status);
 	return scnprintf(buf, PAGE_SIZE, "input gpu [unknown]\n");
 }
 
Signature · 1 line
2.18.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines
Fixes bc2ef884320b ("alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status")

---
drivers/platform/x86/alienware-wmi.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/alienware-wmi.c +1 -2
index c0d1555735cd..83fd7677af24 100644
@@ -587,7 +587,7 @@ static ssize_t show_hdmi_source(struct device *dev,
                       return scnprintf(buf, PAGE_SIZE,
                                        "input [gpu] unknown\n");
       }
-       pr_err("alienware-wmi: unknown HDMI source status: %d\n", out_data);
+       pr_err("alienware-wmi: unknown HDMI source status: %u\n", status);
       return scnprintf(buf, PAGE_SIZE, "input gpu [unknown]\n");
 }
 
--
Quoted 1 line

2.18.0

Yes, thanks.

#2 lore raw
In reply to Dan Carpenter
Quoted 3 lines · On Wed, Apr 24, 2019 at 3:43 PM <[email protected]> wrote:
Quoted 3 lines
Fixes bc2ef884320b ("alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status")

Pushed to my review and testing queue, thanks!

Quoted 23 lines
Quoted 18 lines

---
drivers/platform/x86/alienware-wmi.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/alienware-wmi.c +1 -2
index c0d1555735cd..83fd7677af24 100644
@@ -587,7 +587,7 @@ static ssize_t show_hdmi_source(struct device *dev,
                       return scnprintf(buf, PAGE_SIZE,
                                        "input [gpu] unknown\n");
       }
-       pr_err("alienware-wmi: unknown HDMI source status: %d\n", out_data);
+       pr_err("alienware-wmi: unknown HDMI source status: %u\n", status);
       return scnprintf(buf, PAGE_SIZE, "input gpu [unknown]\n");
 }
 
--
Quoted 1 line

2.18.0

Yes, thanks.

Signature · 2 lines
With Best Regards,
Andy Shevchenko