habanalabs: print message with correct device
authorOded Gabbay <ogabbay@kernel.org>
Tue, 10 Nov 2020 20:03:43 +0000 (22:03 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:35 +0000 (10:47 +0200)
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 <ogabbay@kernel.org>
drivers/misc/habanalabs/common/habanalabs_ioctl.c

index 0729cd43f297c3801884238b7d3ada8980158a52..ba8217fc942578833090c3c03152c986518f5b6e 100644 (file)
@@ -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;
        }