From: Hauke Mehrtens Date: Mon, 27 Feb 2012 23:56:11 +0000 (+0100) Subject: MIPS: BCM47XX: return number of written bytes in nvram_getenv X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=44d4b2ae94b19080d6d033a1f5cf2cc47443be3b;p=linux-beck.git MIPS: BCM47XX: return number of written bytes in nvram_getenv Signed-off-by: Hauke Mehrtens Signed-off-by: John W. Linville --- 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) 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;