[PATCH umr] fix specifying device by ASIC name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 src/lib/discover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/discover.c b/src/lib/discover.c
index e1ccea1d20e4..94d1c676718a 100644
--- a/src/lib/discover.c
+++ b/src/lib/discover.c
@@ -152,7 +152,7 @@ struct umr_asic *umr_discover_asic(struct umr_options *options)
 
 	snprintf(name, sizeof(name)-1, "/sys/kernel/debug/dri/%d/name", options->instance);
 	f = fopen(name, "r");
-	if (!f && !options->no_kernel && !options->use_pci) {
+	if (!f && options->instance >= 0 && !options->no_kernel && !options->use_pci) {
 		int found = 0;
 		if (!options->quiet) {
 			f = popen("lsmod | grep ^amdgpu", "r");
-- 
2.12.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux