Skip to content

Commit

Permalink
devlink: Fix port_type_set function pointer check
Browse files Browse the repository at this point in the history
Fix a typo when checking existence of port_type_set function pointer.

Fixes: 82564f6 ("devlink: Simplify devlink port API calls")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Leon Romanovsky authored and David S. Miller committed Aug 9, 2021
1 parent e08d6d4 commit 2a2b6e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ static int devlink_port_type_set(struct devlink_port *devlink_port,
{
int err;

if (devlink_port->devlink->ops->port_type_set)
if (!devlink_port->devlink->ops->port_type_set)
return -EOPNOTSUPP;

if (port_type == devlink_port->type)
Expand Down

0 comments on commit 2a2b6e3

Please sign in to comment.