From: Oded Gabbay Date: Sun, 1 Sep 2019 13:13:25 +0000 (+0300) Subject: habanalabs: show correct id in error print X-Git-Tag: v5.4-rc1~133^2~1^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=307eae93d5ce3316b4c728408283da957350b2a8;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Omer Shpigelman --- diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c index cebdceb72298a..459fee70a597a 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; }