Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f57e8ca5 authored by Yuval Shaia's avatar Yuval Shaia Committed by Doug Ledford
Browse files

IB/mad: Add port_num to error message



Print the invalid port number to ease troubleshooting.

Signed-off-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 1dd70ea3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -316,7 +316,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
	/* Validate device and port */
	port_priv = ib_get_mad_port(device, port_num);
	if (!port_priv) {
		dev_notice(&device->dev, "ib_register_mad_agent: Invalid port\n");
		dev_notice(&device->dev,
			   "ib_register_mad_agent: Invalid port %d\n",
			   port_num);
		ret = ERR_PTR(-ENODEV);
		goto error1;
	}