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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user