diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2019-09-01 16:13:25 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2019-09-05 14:55:28 +0300 |
commit | 307eae93d5ce3316b4c728408283da957350b2a8 (patch) | |
tree | f57768fd89ae5fc7853ae6ed1bfa28a2f4e88078 /drivers/misc | |
parent | 4c172bbfaa4e1aa26dab58781301902c7b3e4ebc (diff) |
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.c | 4 |
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; } |