Activity/lkml add u64 number parser PATCH Alexey Dobriyan 1 participant 1 message Jul 23, 2016 TreeChronological All quotes Copy b4 command loreShare & toolsCopy link b4 am lore Alexey Dobriyan author 2016-07-23 13:12 UTC #0 Copy lore rawReviewQuoted 3 lines(quoted diff) +3 -0+ ret = kstrtoull(buf, base, &val); + if (!ret) + *result = val; Simply pass "result" directly to kstrtoull(). It will not write the result in case of error.
Alexey Dobriyan author 2016-07-23 13:12 UTC #0 Copy lore rawReviewQuoted 3 lines(quoted diff) +3 -0+ ret = kstrtoull(buf, base, &val); + if (!ret) + *result = val; Simply pass "result" directly to kstrtoull(). It will not write the result in case of error.