kern_fail: Stop checking for failures from fp_malloc(M_WAITOK)

`fp_malloc` is defined as a macro that redirects to `malloc`.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:16 +08:00
parent bac98f86c9
commit 6a2a385507

View File

@ -479,11 +479,10 @@ fail_point_init(struct fail_point *fp, const char *fmt, ...)
/* Allocate the name and fill it in. */
name = fp_malloc(n + 1, M_WAITOK);
if (name != NULL) {
va_start(ap, fmt);
vsnprintf(name, n + 1, fmt, ap);
va_end(ap);
}
va_start(ap, fmt);
vsnprintf(name, n + 1, fmt, ap);
va_end(ap);
fp->fp_name = name;
fp->fp_location = "";
fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME;