From d40f554e9f2270c4bb776efae9ca3f2d3d7f954a Mon Sep 17 00:00:00 2001 From: Pavithra Palanisamy Date: Thu, 2 Aug 2018 17:53:48 +0530 Subject: [PATCH] qca: Modify kstrtoint() function This change modifies kstrtoint function to update the result in destination buffer and return zero on success. Change-Id: Ibdd9b36eed39d5e2ee3afc6f1609c1e35d5fb464 Signed-off-by: Pavithra Palanisamy --- drivers/mtd/ubi/build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } /**