From: Leon Romanovsky <leon@kernel.org>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leonro@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
kernel test robot <lkp@intel.com>
Subject: [PATCH net-next] devlink: Fix port_type_set function pointer check
Date: Mon, 9 Aug 2021 15:03:19 +0300 [thread overview]
Message-ID: <97f68683b3b6c7ea8420c64817771cdedfded7ae.1628510543.git.leonro@nvidia.com> (raw)
From: Leon Romanovsky <leonro@nvidia.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@intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.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
next reply other threads:[~2021-08-09 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 12:03 Leon Romanovsky [this message]
2021-08-09 12:40 ` [PATCH net-next] devlink: Fix port_type_set function pointer check patchwork-bot+netdevbpf
2021-08-09 12:55 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97f68683b3b6c7ea8420c64817771cdedfded7ae.1628510543.git.leonro@nvidia.com \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).