HomeFreeBSD

linuxkpi: Don't clobber result on failure

Description

linuxkpi: Don't clobber result on failure

In kstrto*(), don't assign to *res until we know the conversion is
successful, and address issues that may result in warnings if code
that uses <linux/kstrtox.h> is compiled at high warning levels.

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D54440

(cherry picked from commit 3542d60fb8042474f66fbf2d779ed8c5a80d0f78)

Details

Provenance
desAuthored on Jan 2 2026, 7:30 AM
Reviewer
bz
Differential Revision
D54440: linuxkpi: Don't clobber result on failure
Parents
rGbf1c000e6305: linuxkpi: Add `kstrtou32()`
Branches
Unknown
Tags
Unknown