Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2019 09:15:07 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352960 - head/sys/dev/mlx5/mlx5_core
Message-ID:  <201910020915.x929F7ON098558@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Oct  2 09:15:07 2019
New Revision: 352960
URL: https://svnweb.freebsd.org/changeset/base/352960

Log:
  Fix for missing cleanup code in error case in mlx5en.
  
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Wed Oct  2 09:14:01 2019	(r352959)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Wed Oct  2 09:15:07 2019	(r352960)
@@ -1133,13 +1133,13 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st
 	err = mlx5_fpga_device_start(dev);
 	if (err) {
 		dev_err(&pdev->dev, "fpga device start failed %d\n", err);
-		goto err_fpga_start;
+		goto err_fs;
 	}
 
 	err = mlx5_register_device(dev);
 	if (err) {
 		dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err);
-		goto err_fs;
+		goto err_fpga;
 	}
 
 	set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state);
@@ -1148,7 +1148,9 @@ out:
 	mutex_unlock(&dev->intf_state_mutex);
 	return 0;
 
-err_fpga_start:
+err_fpga:
+	mlx5_fpga_device_stop(dev);
+
 err_fs:
 	mlx5_cleanup_fs(dev);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910020915.x929F7ON098558>