[PATCH] lib/ethdev: sanity check on callback before resource allocation
Ferruh Yigit
ferruh.yigit at amd.com
Tue Jul 11 15:37:37 CEST 2023
On 7/11/2023 2:48 AM, fengchengwen wrote:
> On 2023/7/11 9:18, Kaiyu Zhang wrote:
>> sanity check is performed after a rte_eth_dev object is allocated.
>> The object is not freed if the check fails, though in the current
>> reality this never happens, but it's better programming paradigm
>> to move the quick check up front to the start of
>> rte_eth_dev_pci_generic_probe.
>>
>> Signed-off-by: Kaiyu Zhang <squirrel.prog at gmail.com>
>>
>
> Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>
>
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")
Cc: stable at dpdk.org
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
Applied to dpdk-next-net/main, thanks.
More information about the dev
mailing list