linuxkpi: Avoid a potential null pointer dereference in an error path

Reported by:	Kevin Day <kevin@your.org>
Reviewed by:	bz, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54672
This commit is contained in:
Mark Johnston
2026-01-15 13:51:17 +00:00
parent a4955b0143
commit aa1eb62338
@@ -66,7 +66,8 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware *
uint32_t flags;
if (fw_name == NULL || fw == NULL || dev == NULL) {
*fw = NULL;
if (fw != NULL)
*fw = NULL;
return (-EINVAL);
}