From patchwork Thu Sep 26 06:35:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 1167764 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46f4tV4mHrz9sDB for ; Thu, 26 Sep 2019 16:35:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393171AbfIZGf0 (ORCPT ); Thu, 26 Sep 2019 02:35:26 -0400 Received: from mx.socionext.com ([202.248.49.38]:23324 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388934AbfIZGf0 (ORCPT ); Thu, 26 Sep 2019 02:35:26 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 26 Sep 2019 15:35:25 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 99B90605F8; Thu, 26 Sep 2019 15:35:25 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 26 Sep 2019 15:35:25 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 6BA071A0E9F; Thu, 26 Sep 2019 15:35:25 +0900 (JST) From: Kunihiko Hayashi To: "David S. Miller" , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev() Date: Thu, 26 Sep 2019 15:35:10 +0900 Message-Id: <1569479710-32314-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Until calling register_netdev(), ndev->dev_name isn't specified, and netdev_err() displays "(unnamed net_device)". ave 65000000.ethernet (unnamed net_device) (uninitialized): invalid phy-mode setting ave: probe of 65000000.ethernet failed with error -22 This replaces netdev_err() with dev_err() before calling register_netdev(). Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c index 10d0c3e..f20f6c4 100644 --- a/drivers/net/ethernet/socionext/sni_ave.c +++ b/drivers/net/ethernet/socionext/sni_ave.c @@ -1662,19 +1662,19 @@ static int ave_probe(struct platform_device *pdev) "socionext,syscon-phy-mode", 1, 0, &args); if (ret) { - netdev_err(ndev, "can't get syscon-phy-mode property\n"); + dev_err(dev, "can't get syscon-phy-mode property\n"); goto out_free_netdev; } priv->regmap = syscon_node_to_regmap(args.np); of_node_put(args.np); if (IS_ERR(priv->regmap)) { - netdev_err(ndev, "can't map syscon-phy-mode\n"); + dev_err(dev, "can't map syscon-phy-mode\n"); ret = PTR_ERR(priv->regmap); goto out_free_netdev; } ret = priv->data->get_pinmode(priv, phy_mode, args.args[0]); if (ret) { - netdev_err(ndev, "invalid phy-mode setting\n"); + dev_err(dev, "invalid phy-mode setting\n"); goto out_free_netdev; }