Thanks!

On Mon, May 22, 2023 at 02:25:45PM +0300, Oded Gabbay wrote:
> diff --git a/drivers/accel/habanalabs/common/device.c 
> b/drivers/accel/habanalabs/common/device.c
> index cab5a63db8c1..ca15c8d0d042 100644
> --- a/drivers/accel/habanalabs/common/device.c
> +++ b/drivers/accel/habanalabs/common/device.c
> @@ -2328,13 +2328,9 @@ int hl_device_init(struct hl_device *hdev)
>       hdev->disabled = true;
>       if (expose_interfaces_on_err)
>               cdev_sysfs_debugfs_add(hdev);
> -     if (hdev->pdev)
> -             dev_err(&hdev->pdev->dev,
> -                     "Failed to initialize hl%d. Device %s is NOT usable 
> !\n",
> -                     hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
> -     else
> -             pr_err("Failed to initialize hl%d. Device %s is NOT usable !\n",
> -                     hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
> +     dev_err(&hdev->pdev->dev,
                 ^^^^^^^^^^^^^^^

> +             "Failed to initialize hl%d. Device %s is NOT usable !\n",
> +             hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
                                         ^^^^^^^^^^^^^^^^^^^

I hate to be picky, but would it be too much to get rid of the parens
around (hdev)?

regards,
dan carpenter

Reply via email to