Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4561210pja; Thu, 21 Nov 2019 21:54:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxkXxW/37qL1NfuXkxZ0F3FiFzTl4kW5TlrhQdamkEWWa9/Rvj3LG0g4M6zbYZrNcdELx81 X-Received: by 2002:a17:906:7708:: with SMTP id q8mr19613159ejm.33.1574402041762; Thu, 21 Nov 2019 21:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574402041; cv=none; d=google.com; s=arc-20160816; b=P5V4vNJVhyLfWfHzZNlXdeSRlYx1gw5XEvqh01MUDPZLrPBp3Kkyhu7bS+CzHK/3O1 X6nCDDaRWcaA6Uxf5C/XfNntfeN9URY0aMPZS/WEfL6M9Fj9k0iD163cBESVqHXwY6De qXDKCxYj7NnvavVfgoyQ4J9FIwcay0ep3dmD/lavUs96zOt8uGXugcglua2c7GO9x59N lIHRYtLjgzuI5m6TOCL/UnEYzahtr9MoVDhN14JVHnaQscGex87EwzVDRnEpDTGPkfGP n6kqfs+m13rr0aXc/KZmt5T6X9byYn3JsLx+5Q3PPYpipjoPtR/xHKlozLImFFPq8WIO 54yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oq9IxJrV26l+yZodH/JIuK+saX4un4P+VUIrlqsmlO4=; b=od04Ab8ZfwlmpZvGHnjj/Okc6hXK914cXjD4MhH9KjFV4bG5W6sxXTdu8SeDGWUAw/ ulFSRhJwPXY1FpoZNnBbr91zf8DZSQCb0oqa6Cz9UcDNWKBvSwHM2mQDDuC8gayRvcg3 Scpe3dHqaaUXODsYN4jgmedUGDWXccwkkSoMke6g5w324IL6d7FPKA/5SAn5qR6eT6zy yAFU6Qp9NgOeeROXT7Kt5vyl5lvFUh3pODvEvw3QMZElvdf8PdsOoXRBnDe6OzOaos/B PjjDPIJb3okF4Vbt2QRuX+L8FkfoSrjv0o7IFgR2jY0TefEAFT1xcoh0beWIZ4P8so3q qzrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nFbS0Dm6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17si3335880ejy.239.2019.11.21.21.53.38; Thu, 21 Nov 2019 21:54:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nFbS0Dm6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbfKVFu5 (ORCPT + 99 others); Fri, 22 Nov 2019 00:50:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:55668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbfKVFuu (ORCPT ); Fri, 22 Nov 2019 00:50:50 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C35EA20748; Fri, 22 Nov 2019 05:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401849; bh=uBfze1NgWAGObk+4YKV9h++cdjQx83W+ZcE+McTkqCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nFbS0Dm6N2xuRAK+BB9um9NfLa193lJU5WHhrl6txSq6vZStCRZ7hzicy1lCmoCbq A2ZzHOZGSI3bMEmipeHjKA6ssW/f2w434BGR443KT7SfbEMI5UEWLafVuGtAIOoP5b VfcY8DqKwHfaLGAnxeZzZiTXsgcskIAsyHoQJbsQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Leon Romanovsky , Saeed Mahameed , Sasha Levin , netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 087/219] net/mlx5: Continue driver initialization despite debugfs failure Date: Fri, 22 Nov 2019 00:46:59 -0500 Message-Id: <20191122054911.1750-80-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky [ Upstream commit 199fa087dc6b503baad06712716fac645a983e8a ] The failure to create debugfs entry is unpleasant event, but not enough to abort drier initialization. Align the mlx5_core code to debugfs design and continue execution whenever debugfs_create_dir() successes or not. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 231ed508c240a..5fac00ea62457 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -859,11 +859,9 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct mlx5_priv *priv) priv->numa_node = dev_to_node(&dev->pdev->dev); - priv->dbg_root = debugfs_create_dir(dev_name(&pdev->dev), mlx5_debugfs_root); - if (!priv->dbg_root) { - dev_err(&pdev->dev, "Cannot create debugfs dir, aborting\n"); - return -ENOMEM; - } + if (mlx5_debugfs_root) + priv->dbg_root = + debugfs_create_dir(pci_name(pdev), mlx5_debugfs_root); err = mlx5_pci_enable_device(dev); if (err) { -- 2.20.1