git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
media: v4l2-ioctl.c: don't copy back the result for -ENOTTY
[pandora-kernel.git]
/
drivers
/
power
/
test_power.c
diff --git
a/drivers/power/test_power.c
b/drivers/power/test_power.c
index
b527c93
..
c4a0f5a
100644
(file)
--- a/
drivers/power/test_power.c
+++ b/
drivers/power/test_power.c
@@
-237,6
+237,8
@@
static int map_get_value(struct battery_property_map *map, const char *key,
buf[MAX_KEYLENGTH-1] = '\0';
cr = strnlen(buf, MAX_KEYLENGTH) - 1;
+ if (cr < 0)
+ return def_val;
if (buf[cr] == '\n')
buf[cr] = '\0';