lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425842480-8746-1-git-send-email-nicolassaenzj@gmail.com>
Date:	Sun,  8 Mar 2015 19:21:20 +0000
From:	nicolassaenzj@...il.com
To:	sre@...nel.org, dbaryshkov@...il.com, dwmw2@...radead.org
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nicolas Saenz Julienne <nicolassaenzj@...il.com>
Subject: [PATCH] power: generic-adc-battery: Fix power_supply_property returned value

From: Nicolas Saenz Julienne <nicolassaenzj@...il.com>

The POWER_SUPPLY_PROP_STATUS case in gab_get_property() wasn't providing any
value.

Signed-off-by: Nicolas Saenz Julienne <nicolassaenzj@...il.com>
---
 drivers/power/generic-adc-battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index d72733e..0a566ac 100644
--- a/drivers/power/generic-adc-battery.c
+++ b/drivers/power/generic-adc-battery.c
@@ -159,7 +159,7 @@ static int gab_get_property(struct power_supply *psy,
 
 	switch (psp) {
 	case POWER_SUPPLY_PROP_STATUS:
-		gab_get_status(adc_bat);
+		val->intval = gab_get_status(adc_bat);
 		break;
 	case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
 		val->intval = 0;
-- 
2.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ