habanalabs: run error handling if scrub_device_mem fails after reset
authorTomer Tayar <ttayar@habana.ai>
Tue, 17 Jan 2023 13:50:41 +0000 (15:50 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 26 Jan 2023 09:52:13 +0000 (11:52 +0200)
If device memory scrubbing from hl_device_reset() fails, we return with
an error code but not perform error handling code.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/device.c

index 9a9c494..edeec35 100644 (file)
@@ -1738,7 +1738,7 @@ kill_processes:
        rc = hdev->asic_funcs->scrub_device_mem(hdev);
        if (rc) {
                dev_err(hdev->dev, "scrub mem failed from device reset (%d)\n", rc);
-               return rc;
+               goto out_err;
        }
 
        spin_lock(&hdev->reset_info.lock);