mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
nvmecontrol: Update the test for a valid firmare revision slot
Reported by: Coverity Scan
CID: 1539214
Fixes: 7485926e09
nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
This commit is contained in:
parent
d2a824c29d
commit
1b38f851d8
|
@ -104,7 +104,7 @@ slot_has_valid_firmware(int fd, int slot)
|
|||
read_logpage(fd, NVME_LOG_FIRMWARE_SLOT,
|
||||
NVME_GLOBAL_NAMESPACE_TAG, 0, 0, 0, &fw, sizeof(fw));
|
||||
|
||||
if (fw.revision[slot-1] != 0LLU)
|
||||
if (fw.revision[slot-1][0] != '\0')
|
||||
has_fw = true;
|
||||
|
||||
return (has_fw);
|
||||
|
|
Loading…
Reference in a new issue