diff options
author | Jing Liu <jing2.liu@linux.intel.com> | 2018-08-24 16:52:59 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-05 08:37:18 +0200 |
commit | 2c455ccc0cd67412983b6ae575190d5036256817 (patch) | |
tree | 8584a71e9bb836cc21b02984c3337645da06c0c5 | |
parent | e4db8c6db9356358d6a34caa19166ae72337e0cc (diff) | |
download | seabios-2c455ccc0cd67412983b6ae575190d5036256817.tar.gz |
pci: fix the return value for truncated capability
Return zero when finding truncated capability.
Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
Message-id: 1535100781-3910-2-git-send-email-jing2.liu@linux.intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | src/fw/pciinit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 3a2f7479..d2cea2bb 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -539,6 +539,7 @@ static u8 pci_find_resource_reserve_capability(u16 bdf) if (cap_len < RES_RESERVE_CAP_SIZE) { dprintf(1, "PCI: QEMU resource reserve cap length %d is invalid\n", cap_len); + return 0; } } return cap; |