From patchwork Mon Aug 9 12:03:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 12426311 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC838C4338F for ; Mon, 9 Aug 2021 12:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E7BD60BD3 for ; Mon, 9 Aug 2021 12:03:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235282AbhHIMDp (ORCPT ); Mon, 9 Aug 2021 08:03:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:48884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231327AbhHIMDp (ORCPT ); Mon, 9 Aug 2021 08:03:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2C56760BD3; Mon, 9 Aug 2021 12:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628510604; bh=i1SSaMqLK/t9+a8jBYbUL9UO1xunMtUISULJwZHB5kc=; h=From:To:Cc:Subject:Date:From; b=WMRjwqSuh/4TCq7UOhgFdpZ7z9unosGxuc8a6qoAcOg3U7PEeem9GDS2A/HmQuA64 d/4nqYPUoPzl4UXbJ3xDF8O//5C09bOfvTubSmQzdnvPxWAyjzHcGv/9TP3YFm4ac2 b90hpt6utsyZixoTRaRSwwzFgUS0KVw9bVG+m8+DJLDTNfwxkKA+AnZfK+5iAKNRRX J5q0Q7y/SkxEzSKkKE62UQuKtdXWbYJzjXlOA71h6e624oGb+HBfo8ULhI9+maKf99 EphV2Wd9bW0seqet2fmntkxoOgrmm/JVYf0c5a/ZympyYgwsGq7o2TskD0mq2DUmMR XhNvCcH458ZIw== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kernel test robot Subject: [PATCH net-next] devlink: Fix port_type_set function pointer check Date: Mon, 9 Aug 2021 15:03:19 +0300 Message-Id: <97f68683b3b6c7ea8420c64817771cdedfded7ae.1628510543.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky 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 Signed-off-by: Leon Romanovsky --- 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)