diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index f484e62b32..92b2baa1a9 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -1438,7 +1438,8 @@ int kstrtoint(const char *s, unsigned int base, int *res) if (tmp != (unsigned long long)(int)tmp) return -ERANGE; - return (int)tmp; + *res = (int)tmp; + return 0; } /**