From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=BAYES_40, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 BDAF0C433E7 for ; Sat, 17 Oct 2020 20:45:45 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4A31B207BB for ; Sat, 17 Oct 2020 20:45:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A31B207BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6AD54204BE; Sat, 17 Oct 2020 20:45:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id el4DYtlRA7IB; Sat, 17 Oct 2020 20:45:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D4F34204CA; Sat, 17 Oct 2020 20:45:42 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 899CC1BF407 for ; Sat, 17 Oct 2020 20:45:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 700F5204CA for ; Sat, 17 Oct 2020 20:45:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h4TPdOu7yIVz for ; Sat, 17 Oct 2020 20:45:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by silver.osuosl.org (Postfix) with ESMTPS id 035B6204BE for ; Sat, 17 Oct 2020 20:45:39 +0000 (UTC) Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kTt54-002Bvk-Sq; Sat, 17 Oct 2020 22:45:34 +0200 Date: Sat, 17 Oct 2020 22:45:34 +0200 From: Andrew Lunn To: Alexander A Sverdlin Subject: Re: [PATCH v2 net] staging: octeon: repair "fixed-link" support Message-ID: <20201017204534.GS456889@lunn.ch> References: <20201016101858.11374-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201016101858.11374-1-alexander.sverdlin@nokia.com> X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Aaro Koskinen , Greg Kroah-Hartman , Ralf Baechle , netdev@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" > + if (priv->of_node && of_phy_is_fixed_link(priv->of_node)) { > + if (of_phy_register_fixed_link(priv->of_node)) { > + netdev_err(dev, "Failed to register fixed link for interface %d, port %d\n", > + interface, priv->port); > + dev->netdev_ops = NULL; > + } > + } > + > if (!dev->netdev_ops) { > free_netdev(dev); Setting dev->netdev_ops to NULL to indicate an error is pretty odd. But this is staging. How about cleaning this up. of_phy_register_fixed_link() returns an -errno which you should return. Andrew _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel