During hard-reset, the driver rejects further IOCTL calls and prints
an error message. That error message should be printed with the correct
device instead of using only the control device.

Signed-off-by: Oded Gabbay <[email protected]>
---
 drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/common/habanalabs_ioctl.c 
b/drivers/misc/habanalabs/common/habanalabs_ioctl.c
index 0729cd43f297..ba8217fc9425 100644
--- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c
+++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c
@@ -573,7 +573,7 @@ static long _hl_ioctl(struct file *filep, unsigned int cmd, 
unsigned long arg,
        int retcode;
 
        if (hdev->hard_reset_pending) {
-               dev_crit_ratelimited(hdev->dev_ctrl,
+               dev_crit_ratelimited(dev,
                        "Device HARD reset pending! Please close FD\n");
                return -ENODEV;
        }
-- 
2.17.1

Reply via email to