Skip to content

Commit

Permalink
linux/efa: Assign err when failing to create everbs device
Browse files Browse the repository at this point in the history
When everbs device creation fails, err variable should be assigned.
While at it, log err as part of the error message.

Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
  • Loading branch information
gal-pressman committed Aug 28, 2019
1 parent 542d7e2 commit 07b5dd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/linux/efa/efa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,9 @@ static int efa_everbs_dev_init(struct efa_dev *dev, int devnum)
EFA_EVERBS_DEVICE_NAME "%d",
devnum);
if (IS_ERR(dev->everbs_dev)) {
ibdev_err(&dev->ibdev, "Failed to create device: %s%d\n",
EFA_EVERBS_DEVICE_NAME, devnum);
err = PTR_ERR(dev->everbs_dev);
ibdev_err(&dev->ibdev, "Failed to create device: %s%d [%d]\n",
EFA_EVERBS_DEVICE_NAME, devnum, err);
goto err;
}

Expand Down

0 comments on commit 07b5dd7

Please sign in to comment.