mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
MIPS: BCM47XX: return number of written bytes in nvram_getenv
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
a027237a56
commit
44d4b2ae94
@ -107,8 +107,7 @@ int nvram_getenv(char *name, char *val, size_t val_len)
|
||||
value = eq + 1;
|
||||
if ((eq - var) == strlen(name) &&
|
||||
strncmp(var, name, (eq - var)) == 0) {
|
||||
snprintf(val, val_len, "%s", value);
|
||||
return 0;
|
||||
return snprintf(val, val_len, "%s", value);
|
||||
}
|
||||
}
|
||||
return NVRAM_ERR_ENVNOTFOUND;
|
||||
|
Loading…
Reference in New Issue
Block a user