devlink: Fix referring to hw_addr attribute during state validation
authorParav Pandit <parav@nvidia.com>
Mon, 29 Jan 2024 19:10:59 +0000 (21:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:36 +0000 (20:14 +0000)
commitef3d6ed3c8b3de8fee7aee1eb43a0b8d0f7ee533
treea0e4047775c02252f67d64023ac77fe759c49a33
parentd99971ec1b3aa1a978f828aa0011678174e6112b
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>
net/devlink/port.c