From patchwork Mon Dec 12 19:37:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 32517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2431482wrr; Mon, 12 Dec 2022 11:43:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4568PlazuvrU22kO0wy9ItJoIRb6Wj1237XUHyBpo758uV3mS4laDJdfk/sJ+5JmMDF2F+ X-Received: by 2002:a05:6a00:84d:b0:566:900d:5ada with SMTP id q13-20020a056a00084d00b00566900d5adamr24799528pfk.10.1670874190863; Mon, 12 Dec 2022 11:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670874190; cv=none; d=google.com; s=arc-20160816; b=utne/DhQW6bFEKgi5Ceiny9eRw8e4iWSN0EKcgobbMtoWF9kkPuWHeZR5lXOvjK0nz Y889/EmFLiruETgiEyvSrv2fv+7sGa9U6Zil1He/iD73ak+36tnC0OyEbBNGV/JlVPNO 434wd5G/QVt8jUvz/sqQHGlE9DHXSdGxdyrMQaNd82KiIRJ+F7HOgmLDtOCV+qp99F3Q gj5Zaua4tHqYpTMfQVtcCx5f2LAM9Lz6Lwvydz/cm8lpUv8rG9m9yurPo98zLTtKp+jO qi8tymHiJp3hpQ6W6399AdtL6JvIrWspQJVDg1l7P/1FQVL3vesVQhULxW6UXkkDlILT El2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+JrotEmnHoCmzhZ2FxE80jEz7Sh0oQoU42lmqHDMnPM=; b=Gf9HlYACM+IlyDn6j/6qFmD1AJ6IF34c3D9Jlw72Kh96QiVg/tenI24JacAO0lmfDg +YbBBah+VDp0qHsSQmPclFS6Lx4tmDZlFh9WriJWFhOn86HU+NHnlTg5crQsvOBX/R+1 i5fq6D+/t/s6xLkD82OCorxNwZKv8lCKBqNr9FSFgyiRI4j+bf6hiA3Ru9QiowEJyBEP vmyma9zq6We5Ju/600l2OvC4UHYjWPDMO6iBtl+6ps9p4TL933+bEZoMJZ860HVu0BKq oePFmqXZpDzp6pUWtQklU7b6uMupwrjmQwddTI2LL3Dy5AMSib+Occt5yH0FFb+aqqXP VgRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a056a001c8500b00574eb89dfc0si10004210pfw.252.2022.12.12.11.42.57; Mon, 12 Dec 2022 11:43:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233254AbiLLTiB (ORCPT + 99 others); Mon, 12 Dec 2022 14:38:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232254AbiLLTh7 (ORCPT ); Mon, 12 Dec 2022 14:37:59 -0500 Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68B2C15834 for ; Mon, 12 Dec 2022 11:37:56 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 4ocXpvXppb9QW4ocXpZUeo; Mon, 12 Dec 2022 20:37:51 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 12 Dec 2022 20:37:51 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Horatiu Vultur , UNGLinuxDriver@microchip.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , netdev@vger.kernel.org Subject: [PATCH net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap() Date: Mon, 12 Dec 2022 20:37:16 +0100 Message-Id: <27992ffcee47fc865ce87274d6dfcffe7a1e69e0.1670873784.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752038575207901995?= X-GMAIL-MSGID: =?utf-8?q?1752038575207901995?= vcap_alloc_rule() can't return NULL. So remove some dead-code Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c index 300fe4005919..f9ebfaafbebc 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c @@ -76,8 +76,6 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port, vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev, LAN966X_VCAP_CID_IS2_L0, VCAP_USER_PTP, 0, rule_id); - if (!vrule) - return -ENOMEM; if (IS_ERR(vrule)) return PTR_ERR(vrule);