<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Nov 16, 2026 at 2:39 AM Evgeny Sokolov <<a href="mailto:Evgeny.Sokolov@infotecs.ru">Evgeny.Sokolov@infotecs.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Sokolov Evgeny <<a href="mailto:Evgeny.Sokolov@infotecs.ru" target="_blank">Evgeny.Sokolov@infotecs.ru</a>><br>
<br>
Check whether the backing Ethernet device was successfully retrieved.<br>
If the device is not found, return -ENODEV<br>
<br>
Found by InfoTeCS on behalf of Linux Verification Center (<a href="http://linuxtesting.org" rel="noreferrer" target="_blank">linuxtesting.org</a>) with SVACE.<br>
<br>
Signed-off-by: Sokolov Evgeny <<a href="mailto:Evgeny.Sokolov@infotecs.ru" target="_blank">Evgeny.Sokolov@infotecs.ru</a>><br>
---<br>
drivers/net/bnxt/bnxt_ethdev.c | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c<br>
index 23edd94444..8dcf62f176 100644<br>
--- a/drivers/net/bnxt/bnxt_ethdev.c<br>
+++ b/drivers/net/bnxt/bnxt_ethdev.c<br>
@@ -6994,6 +6994,9 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,<br>
return ret;<br>
<br>
backing_eth_dev = rte_eth_dev_allocated(pci_dev-><a href="http://device.name" rel="noreferrer" target="_blank">device.name</a>);<br>
+ if (backing_eth_dev == NULL) {<br>
+ return -ENODEV;<br>
+ }<br></blockquote><div>Either add a debug error message or remove the braces for the if condition. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
}<br>
PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci probe",<br>
backing_eth_dev->data->port_id);<br>
-- <br>
2.30.2<br>
<br>
</blockquote></div></div>