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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 90016C433E7 for ; Sat, 17 Oct 2020 20:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59DDC207BC for ; Sat, 17 Oct 2020 20:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439044AbgJQUps (ORCPT ); Sat, 17 Oct 2020 16:45:48 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:32856 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438722AbgJQUps (ORCPT ); Sat, 17 Oct 2020 16:45:48 -0400 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 Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman , Aaro Koskinen , Ralf Baechle , "David S. Miller" , netdev@vger.kernel.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201016101858.11374-1-alexander.sverdlin@nokia.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > + 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