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

Joel Sherrill joel at rtems.org
Fri Feb 10 13:59:06 UTC 2023


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 5946ace..4902ed0 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));
-- 
1.8.3.1



More information about the devel mailing list