> +     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.

Reply via email to