36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 1dc1ecf7dce7825d352b045c98aa51711b58aaca Mon Sep 17 00:00:00 2001
|
|
From: Haren Myneni <haren@linux.ibm.com>
|
|
Date: Fri, 21 Jun 2024 15:39:42 -0700
|
|
Subject: [PATCH] drmgr: Return from get_node_by_name() if matched DRC index
|
|
|
|
Upstream: merged, expected in v1.3.13
|
|
Git-commit: 1dc1ecf7dce7825d352b045c98aa51711b58aaca
|
|
|
|
get_node_by_name() should return dr_node if the DRC name or DRC
|
|
index is matched. But the current code returns only if the DRC
|
|
name is matched. This patch fixes this issue and returns dr_node
|
|
if the index is matched.
|
|
|
|
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
|
|
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
|
---
|
|
src/drmgr/common_pci.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c
|
|
index c6dcfdf..2e0e5fb 100644
|
|
--- a/src/drmgr/common_pci.c
|
|
+++ b/src/drmgr/common_pci.c
|
|
@@ -969,7 +969,7 @@ get_node_by_name(const char *drc_name, uint32_t node_type)
|
|
/* See if the drc index was specified */
|
|
drc_index = strtoul(drc_name, NULL, 0);
|
|
if (node->drc_index == drc_index)
|
|
- continue;
|
|
+ break;
|
|
|
|
for (child = node->children; child; child = child->next) {
|
|
if (strcmp(drc_name, child->drc_name) == 0)
|
|
--
|
|
2.45.2
|
|
|