]> git.baikalelectronics.ru Git - uboot.git/commit
virtio: pci: Check virtio configs are mapped
authorAndrew Scull <ascull@google.com>
Thu, 21 Apr 2022 16:11:14 +0000 (16:11 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 3 May 2022 22:33:29 +0000 (18:33 -0400)
commit0d322192d2ace837ea6d8a61cb3550402e2ffe7a
tree99e64cb14f47e4b6e4e980c6c2cf336cde00da7c
parent87cc2410ce06457101e0a99ff444d448771d1f98
virtio: pci: Check virtio configs are mapped

Prepare for calls to `virtio_pci_map_capability()` failing by returning
NULL on error. If this happens, later accesses to the pointers would be
unsafe so cause the probe to fail if such an error occurs.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/virtio/virtio_pci_modern.c