summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-03-15 10:06:23 +0300
committerMatthew Garrett <mjg@redhat.com>2011-03-28 06:46:06 -0400
commit0986f25fbba8827762b35222bb45d2fbb2d72fa4 (patch)
tree84b1dae95e472a785cba1007a660f090c45125b1 /drivers
parent2783658477205b0cf31e5c02d69214e36fe59aae (diff)
downloadlinux-0986f25fbba8827762b35222bb45d2fbb2d72fa4.tar.bz2
asus-wmi: signedness bug in read_brightness()
"err" needs to be signed for the error handling to work. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/asus-wmi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 5b779a9443d6..a038595200ee 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -946,7 +946,8 @@ static int read_brightness_max(struct asus_wmi *asus)
static int read_brightness(struct backlight_device *bd)
{
struct asus_wmi *asus = bl_get_data(bd);
- u32 retval, err;
+ u32 retval;
+ int err;
err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_BRIGHTNESS, &retval);