Message ID | 20200622100056.10151-3-brgl@bgdev.pl (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=eeZ+=AD=lists.infradead.org=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8610D14E3 for <patchwork-linux-mediatek@patchwork.kernel.org>; Mon, 22 Jun 2020 13:49:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57CD620716 for <patchwork-linux-mediatek@patchwork.kernel.org>; Mon, 22 Jun 2020 13:49:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Vvh+7PD6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="c0YffHio"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="W5twYeDF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57CD620716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eAXzZX4UC+I7OTdaofPENVXdPOgIbq0oaA7Q9prR9lM=; b=Vvh+7PD6FSFYQVfDexzhx8clY GIpbewkRdgO8d1rfV0pUoqG7s4PVfC0YZBiVmE5aO70aZjECW4WYRX15PHWqWvD1n3BOOIdOOVr+w CG5I2dHb5q3EQg3CrCrl0u+8EAyPaXLF9znefZeogp+t6RFPwqGah0KK/KSddck3pjosAGW9Vb4K9 ahbf/8z9KeQWPqj1O6UEfYqnhmxtP2BXtbgY/YjMo1PKOPZIsHWrlEEZHWd9QnjlgGt7dYNok9tpC r3xJdKjfmZTnHaJBfy6rLaD7HdwiIGq06GlOkJEFbwdng6KpI/cgU6Exn6rP5OmjB6wq/QnCT/84V FlhYGnmig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnMp4-0002oq-5g; Mon, 22 Jun 2020 13:49:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnLy4-00058l-AE for linux-mediatek@merlin.infradead.org; Mon, 22 Jun 2020 12:54:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=nZJ9RrYkX//UjOI/5YYylQYoHuaDDR4YnVJY1VbZiK8=; b=c0YffHioHharkk5mtpddf9GN0A RoJR12NULf+a5dc5HMP/2ZjMzDMSCxWiGx3aUbZyA3Q9Qrrb6OFjDHcD42ncop8u2H8OdxkT+z4Qo mWAIg2cd2QZcvUEXKnhNxerKcAT8Yrhwg1Xj6+F3RlFVXkdmqUQXb2DchfBcFc+sKMfFGVK4B9JG6 RGGyd/RTuY1dB1QDfEXAjbsb39lotq7ZzUpnp2u3upLV26RDz9yuz3eK+5yo5UkW7DGf6y85FyCkh ZNQDccZ20tNyX11stMjHwO53Uh6IkhMAJvvWZAu9LK3eAYWQMrwbkWrbiaDdjbC7FeC4/TqJXDrRO vYdDImlw==; Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnJGI-0004fe-NS for linux-mediatek@lists.infradead.org; Mon, 22 Jun 2020 10:01:12 +0000 Received: by mail-wm1-x344.google.com with SMTP id g10so14254116wmh.4 for <linux-mediatek@lists.infradead.org>; Mon, 22 Jun 2020 03:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nZJ9RrYkX//UjOI/5YYylQYoHuaDDR4YnVJY1VbZiK8=; b=W5twYeDFovUtibE54WQz/oY7xyAdsth+BrFOY/mwsKgJPsn0I8IXyw+KxwKQF1ccxI 0Vt4K58MBHihtcBcsAbduhBD/mpp6DDwwRtQDMg4DPDarSks61h5JkloiQmN5VvS0yn1 0MSYq3+hFxyViGeyscqGmPromya4jk9KRI0GNLYt2z3RxhbOM4E3fY3KBk6qoCm79iXc 3Hv1vs4zZ9h7EGmVIUsjsu72HT6azkCzrdmgJHG4VQQEoPysFHsyyrj5e60fdxVZexdD trJKHKTrt9CadDNiF6JYZkjIDKxYSRiSUtH8aF77wU6jWNuYEqz2A6dAA/jnuyrnG/K6 JkAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nZJ9RrYkX//UjOI/5YYylQYoHuaDDR4YnVJY1VbZiK8=; b=CglQ6Aehve0VFbc4UQyKZ1gIwBkXpriHAuUUWDiUiB9tuRX0tLAo589W4TGE7qsHow /6Oa0/JaFQSjLujE9hdj1B/9CpUuQUOMjimsInGEZMig2+7mZW9dRCuBfG0tI1mqKEhG l/wtUBCHTWXWkEoYJDzJ6kEzwzfc9UDg39qVPq+iAj73XmOKRqfR8m7PpJMAVL6h4Bmw ploOrF9QejlNu06ZnNbdkGCnrkvurYAc0iyzW3UMQeBZFuqRmYn4JHp5ScUdrI93+Y9k R05D43yUyX28pbAJ7Cs8ZQp0sYkiZVlLiXlQI2DLjtbW+r0qURnUwqSEJ0szkw7VL951 0+3w== X-Gm-Message-State: AOAM532pw1Nb0whdgeMgWpfNv7HHF2FMvzWDrI0HyIPjMTv23m1ApOSB seKP1egE5aqADLibgr0DVCMOAQ== X-Google-Smtp-Source: ABdhPJz3Tx9rRuWOQsVP67dBEA0GfJ//6KQ3oIcn8+cDfu01dOKFVefKNNRcSbP+61lUU38AkDnLJw== X-Received: by 2002:a05:600c:2dc1:: with SMTP id e1mr5037577wmh.108.1592820068560; Mon, 22 Jun 2020 03:01:08 -0700 (PDT) Received: from localhost.localdomain (lfbn-nic-1-65-232.w2-15.abo.wanadoo.fr. [2.15.156.232]) by smtp.gmail.com with ESMTPSA id x205sm16822187wmx.21.2020.06.22.03.01.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 03:01:08 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Jonathan Corbet <corbet@lwn.net>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, John Crispin <john@phrozen.org>, Sean Wang <sean.wang@mediatek.com>, Mark Lee <Mark-MC.Lee@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, Realtek linux nic maintainers <nic_swsd@realtek.com>, Heiner Kallweit <hkallweit1@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Russell King <linux@armlinux.org.uk>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com> Subject: [PATCH 02/11] net: ethernet: ixgbe: don't call devm_mdiobus_free() Date: Mon, 22 Jun 2020 12:00:47 +0200 Message-Id: <20200622100056.10151-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200622100056.10151-1-brgl@bgdev.pl> References: <20200622100056.10151-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200622_110110_862368_6EBB430F X-CRM114-Status: GOOD ( 14.37 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, Bartosz Golaszewski <bgolaszewski@baylibre.com>, Stephane Le Provost <stephane.leprovost@mediatek.com>, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fabien Parent <fparent@baylibre.com>, linux-mediatek@lists.infradead.org, Andrew Perepech <andrew.perepech@mediatek.com>, Pedro Tsai <pedro.tsai@mediatek.com>, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org |
Series |
net: improve devres helpers
|
expand
|
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index 2fb97967961c..7980d7265e10 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c @@ -905,7 +905,6 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw) struct pci_dev *pdev = adapter->pdev; struct device *dev = &adapter->netdev->dev; struct mii_bus *bus; - int err = -ENODEV; bus = devm_mdiobus_alloc(dev); if (!bus) @@ -923,7 +922,7 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X550EM_A_1G_T: case IXGBE_DEV_ID_X550EM_A_1G_T_L: if (!ixgbe_x550em_a_has_mii(hw)) - goto ixgbe_no_mii_bus; + return -ENODEV; bus->read = &ixgbe_x550em_a_mii_bus_read; bus->write = &ixgbe_x550em_a_mii_bus_write; break; @@ -948,15 +947,8 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw) */ hw->phy.mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_SUPPORTS_C22; - err = mdiobus_register(bus); - if (!err) { - adapter->mii_bus = bus; - return 0; - } - -ixgbe_no_mii_bus: - devm_mdiobus_free(dev, bus); - return err; + adapter->mii_bus = bus; + return mdiobus_register(bus); } /**