diff options
author | Xiongfeng Wang <[email protected]> | 2022-11-23 14:59:19 +0800 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2022-11-24 10:01:42 +0100 |
commit | ad17c2a3f11b0f6b122e7842d8f7d9a5fcc7ac63 (patch) | |
tree | 85dc44783eee9395727f06f48f2ae0e8e8d1eb0f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 6aae1bcb41c7aefd28bf5d90e36ebdd151c2d8ba (diff) |
octeontx2-af: Fix reference count issue in rvu_sdp_init()
pci_get_device() will decrease the reference count for the *from*
parameter. So we don't need to call put_device() to decrease the
reference. Let's remove the put_device() in the loop and only decrease
the reference count of the returned 'pdev' for the last loop because it
will not be passed to pci_get_device() as input parameter. We don't need
to check if 'pdev' is NULL because it is already checked inside
pci_dev_put(). Also add pci_dev_put() for the error path.
Fixes: fe1939bb2340 ("octeontx2-af: Add SDP interface support")
Signed-off-by: Xiongfeng Wang <[email protected]>
Reviewed-by: Saeed Mahameed <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions