diff options
author | Parav Pandit <parav@nvidia.com> | 2024-01-29 21:10:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-05 20:14:36 +0000 |
commit | ef3d6ed3c8b3de8fee7aee1eb43a0b8d0f7ee533 (patch) | |
tree | a0e4047775c02252f67d64023ac77fe759c49a33 /net | |
parent | d99971ec1b3aa1a978f828aa0011678174e6112b (diff) | |
download | linux-stable-ef3d6ed3c8b3de8fee7aee1eb43a0b8d0f7ee533.tar.gz linux-stable-ef3d6ed3c8b3de8fee7aee1eb43a0b8d0f7ee533.tar.bz2 linux-stable-ef3d6ed3c8b3de8fee7aee1eb43a0b8d0f7ee533.zip |
devlink: Fix referring to hw_addr attribute during state validation
[ Upstream commit 1a89e24f8bfd3e3562d69709c9d9cd185ded869b ]
When port function state change is requested, and when the driver
does not support it, it refers to the hw address attribute instead
of state attribute. Seems like a copy paste error.
Fix it by referring to the port function state attribute.
Fixes: c0bea69d1ca7 ("devlink: Validate port function request")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240129191059.129030-1-parav@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/devlink/port.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/devlink/port.c b/net/devlink/port.c index 4763b42885fb..91ba1ca0f355 100644 --- a/net/devlink/port.c +++ b/net/devlink/port.c @@ -665,7 +665,7 @@ static int devlink_port_function_validate(struct devlink_port *devlink_port, return -EOPNOTSUPP; } if (tb[DEVLINK_PORT_FN_ATTR_STATE] && !ops->port_fn_state_set) { - NL_SET_ERR_MSG_ATTR(extack, tb[DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR], + NL_SET_ERR_MSG_ATTR(extack, tb[DEVLINK_PORT_FN_ATTR_STATE], "Function does not support state setting"); return -EOPNOTSUPP; } |