[rtems commit] shell/main_pci.c: Address Dereference after null error check

Joel Sherrill joel at rtems.org
Fri Feb 10 14:57:25 UTC 2023


Module:    rtems
Branch:    master
Commit:    26e1610833a9f7c77409bbed99bf5015387438c6
Changeset: http://git.rtems.org/rtems/commit/?id=26e1610833a9f7c77409bbed99bf5015387438c6

Author:    Joel Sherrill <joel at rtems.org>
Date:      Fri Feb 10 07:55:17 2023 -0600

shell/main_pci.c: Address Dereference after null error check

Coverity CID 1399716

Closes #431.

---

 cpukit/libmisc/shell/main_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libmisc/shell/main_pci.c b/cpukit/libmisc/shell/main_pci.c
index 5946aceb33..4902ed07b9 100644
--- a/cpukit/libmisc/shell/main_pci.c
+++ b/cpukit/libmisc/shell/main_pci.c
@@ -375,7 +375,7 @@ static int shell_pci_infodev(
   printf(" PCIID:         0x%04x\n", dev->busdevfun);
   bus = dev->bus;
   if (!bus) {
-    printf(" AT BUS:        0x%x via Host Bridge\n", bus->num);
+    printf(" AT BUS:        via Host Bridge\n");
   } else {
     printf(" AT BUS:        0x%x via Bridge at [%x:%x:%x]\n", bus->num, 
            PCI_DEV_EXPAND(bus->dev.busdevfun));



More information about the vc mailing list