[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <97f68683b3b6c7ea8420c64817771cdedfded7ae.1628510543.git.leonro@nvidia.com>
Date: Mon, 9 Aug 2021 15:03:19 +0300
From: Leon Romanovsky <leon@...nel.org>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Leon Romanovsky <leonro@...dia.com>, Jiri Pirko <jiri@...dia.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: [PATCH net-next] devlink: Fix port_type_set function pointer check
From: Leon Romanovsky <leonro@...dia.com>
Fix a typo when checking existence of port_type_set function pointer.
Fixes: 82564f6c706a ("devlink: Simplify devlink port API calls")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Leon Romanovsky <leonro@...dia.com>
---
net/core/devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index d3b16dd9f64e..b02d54ab59ac 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -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)
--
2.31.1
Powered by blists - more mailing lists