summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-09-01 15:13:25 +0200
committerOded Gabbay <oded.gabbay@gmail.com>2019-09-05 13:55:28 +0200
commit307eae93d5ce3316b4c728408283da957350b2a8 (patch)
treef57768fd89ae5fc7853ae6ed1bfa28a2f4e88078 /drivers/misc
parenthabanalabs: stop using the acronym KMD (diff)
downloadlinux-307eae93d5ce3316b4c728408283da957350b2a8.tar.xz
linux-307eae93d5ce3316b4c728408283da957350b2a8.zip
habanalabs: show correct id in error print
If the initialization of a device failed, the driver prints an error message with the id of the device. The device index on the file system is that id divided by 2. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
index cebdceb72298..459fee70a597 100644
--- a/drivers/misc/habanalabs/device.c
+++ b/drivers/misc/habanalabs/device.c
@@ -1292,10 +1292,10 @@ out_disabled:
if (hdev->pdev)
dev_err(&hdev->pdev->dev,
"Failed to initialize hl%d. Device is NOT usable !\n",
- hdev->id);
+ hdev->id / 2);
else
pr_err("Failed to initialize hl%d. Device is NOT usable !\n",
- hdev->id);
+ hdev->id / 2);
return rc;
}