All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/mellanox/mlx5/core/main.c:1187 mlx5_load_one() warn: missing error code 'err'
Date: Mon, 18 Jan 2021 09:05:50 +0800	[thread overview]
Message-ID: <202101180932.X6YNlHey-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5616 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Parav Pandit <parav@mellanox.com>
CC: Saeed Mahameed <saeedm@mellanox.com>
CC: Moshe Shemesh <moshe@mellanox.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e2da783614bb8930aa89753d3c3cd53d5604665d
commit: 4162f58b476b248d0718f3d6aad2e57da2b08a63 net/mlx5: Have single error unwinding path
date:   8 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 months ago
config: i386-randconfig-m021-20210118 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/main.c:1187 mlx5_load_one() warn: missing error code 'err'

vim +/err +1187 drivers/net/ethernet/mellanox/mlx5/core/main.c

59211bd3b6329c3e Mohamad Haj Yahia 2016-09-09  1179  
4383cfcc65e7879e Michael Guralnik  2019-10-27  1180  int mlx5_load_one(struct mlx5_core_dev *dev, bool boot)
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1181  {
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1182  	int err = 0;
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1183  
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1184  	mutex_lock(&dev->intf_state_mutex);
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1185  	if (test_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state)) {
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1186  		mlx5_core_warn(dev, "interface is up, NOP\n");
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29 @1187  		goto out;
1bde6e301cf6217d Eli Cohen         2014-01-14  1188  	}
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1189  	/* remove any previous indication of internal error */
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1190  	dev->state = MLX5_DEVICE_STATE_UP;
e126ba97dba9edeb Eli Cohen         2013-07-07  1191  
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1192  	err = mlx5_function_setup(dev, boot);
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1193  	if (err)
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1194  		goto out;
e126ba97dba9edeb Eli Cohen         2013-07-07  1195  
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1196  	if (boot) {
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1197  		err = mlx5_init_once(dev);
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1198  		if (err) {
98a8e6fc482d9680 Huy Nguyen        2019-03-29  1199  			mlx5_core_err(dev, "sw objs init failed\n");
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1200  			goto function_teardown;
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1201  		}
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1202  	}
cd23b14b654769db Eli Cohen         2013-07-18  1203  
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1204  	err = mlx5_load(dev);
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1205  	if (err)
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1206  		goto err_load;
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1207  
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1208  	if (boot) {
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1209  		err = mlx5_devlink_register(priv_to_devlink(dev), dev->device);
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1210  		if (err)
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1211  			goto err_devlink_reg;
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1212  	}
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1213  
ecd01db8711d4c60 Parav Pandit      2020-03-08  1214  	if (mlx5_device_registered(dev))
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1215  		mlx5_attach_device(dev);
ecd01db8711d4c60 Parav Pandit      2020-03-08  1216  	else
ecd01db8711d4c60 Parav Pandit      2020-03-08  1217  		mlx5_register_device(dev);
e126ba97dba9edeb Eli Cohen         2013-07-07  1218  
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1219  	set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state);
e126ba97dba9edeb Eli Cohen         2013-07-07  1220  
4162f58b476b248d Parav Pandit      2020-05-01  1221  	mutex_unlock(&dev->intf_state_mutex);
4162f58b476b248d Parav Pandit      2020-05-01  1222  	return 0;
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1223  
a6f3b62386a02c1e Michael Guralnik  2019-11-20  1224  err_devlink_reg:
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1225  	mlx5_unload(dev);
a80d1b68c8b7a06b Saeed Mahameed    2019-03-29  1226  err_load:
59211bd3b6329c3e Mohamad Haj Yahia 2016-09-09  1227  	if (boot)
59211bd3b6329c3e Mohamad Haj Yahia 2016-09-09  1228  		mlx5_cleanup_once(dev);
e161105e58da81fa Saeed Mahameed    2019-03-29  1229  function_teardown:
e161105e58da81fa Saeed Mahameed    2019-03-29  1230  	mlx5_function_teardown(dev, boot);
89d44f0a6c732db2 Majd Dibbiny      2015-10-14  1231  	dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
4162f58b476b248d Parav Pandit      2020-05-01  1232  out:
89d44f0a6c732db2 Majd Dibbiny      2015-10-14  1233  	mutex_unlock(&dev->intf_state_mutex);
e126ba97dba9edeb Eli Cohen         2013-07-07  1234  	return err;
e126ba97dba9edeb Eli Cohen         2013-07-07  1235  }
e126ba97dba9edeb Eli Cohen         2013-07-07  1236  

:::::: The code at line 1187 was first introduced by commit
:::::: a80d1b68c8b7a06b85434f89d138f0c28f3d27c9 net/mlx5: Break load_one into three stages

:::::: TO: Saeed Mahameed <saeedm@mellanox.com>
:::::: CC: Saeed Mahameed <saeedm@mellanox.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38957 bytes --]

             reply	other threads:[~2021-01-18  1:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  1:05 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-19  9:08 drivers/net/ethernet/mellanox/mlx5/core/main.c:1187 mlx5_load_one() warn: missing error code 'err' Dan Carpenter
2021-01-19  9:08 ` Dan Carpenter
2021-01-19  9:08 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202101180932.X6YNlHey-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.