aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-02-27 18:56:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-05 15:20:50 -0500
commit44d4b2ae94b19080d6d033a1f5cf2cc47443be3b (patch)
tree714b05a738bdce1545345704e95ece7fd4e7a872 /arch/mips/bcm47xx
parenta027237a56f7d519eee5749cfb720e568d0bb0b6 (diff)
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>
Diffstat (limited to 'arch/mips/bcm47xx')
-rw-r--r--arch/mips/bcm47xx/nvram.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
index a84e3bb7387f..d43ceff5be47 100644
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -107,8 +107,7 @@ int nvram_getenv(char *name, char *val, size_t val_len)
107 value = eq + 1; 107 value = eq + 1;
108 if ((eq - var) == strlen(name) && 108 if ((eq - var) == strlen(name) &&
109 strncmp(var, name, (eq - var)) == 0) { 109 strncmp(var, name, (eq - var)) == 0) {
110 snprintf(val, val_len, "%s", value); 110 return snprintf(val, val_len, "%s", value);
111 return 0;
112 } 111 }
113 } 112 }
114 return NVRAM_ERR_ENVNOTFOUND; 113 return NVRAM_ERR_ENVNOTFOUND;