summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.2/197-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch
blob: 7d8180b1e14bb3a3745a9a1cb4ec526a447e7973 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -243,8 +243,7 @@ int nvram_getenv(char *name, char *val,
 		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;