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

Gedare Bloom gedare at rtems.org
Fri Feb 10 14:54:54 UTC 2023


ok

On Fri, Feb 10, 2023 at 6:59 AM Joel Sherrill <joel at rtems.org> wrote:
>
> 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
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list