bus/fslmc: fix iterating on a class type
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 26 Jun 2020 14:04:29 +0000 (16:04 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:30 +0000 (14:52 +0200)
commit44255245433b3b4394474db100d478341aeb08fc
treec63bb97a652c0d90cc8260381dfe52130d1f1a9f
parentbe2ee360fe86cf041d1a07577919160e6557c679
bus/fslmc: fix iterating on a class type

This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:

RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
    ...
}

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
drivers/bus/fslmc/fslmc_bus.c