Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1319392yba; Tue, 2 Apr 2019 06:48:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwuep09DjmtRZmtqOTmey4w2Kq+GAPhrboXvzzaCBFlirin3rONaBZ1qb4OEGiOxU/j+jt X-Received: by 2002:a17:902:2f:: with SMTP id 44mr70701197pla.139.1554212909196; Tue, 02 Apr 2019 06:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212909; cv=none; d=google.com; s=arc-20160816; b=Q5hGcARnVBmQpiWOuSYIGqaCeGssZCDQu0yaEeJG76lmG0RNsburSR3oaEPL3o787W /91Zlny3S2BOJ7+1sMdjBBD7wFeBQ1y12vLbjb9cpg4i9AcHTEEJ+85gLR+uZ+95cfIY SS+Bb+D0pIr7Dpa180EwdgVHOeixXBma/6pLXoT6I3LzyEzMBLc76fQY7easN/wFzEdi k92fWD2uhy5Tvs81rwcb6UNiyw9jPh3rxd0eMm/myeA/qD3Ak9+xZMPMKOrUEZSWGqfg +MqLwkwfpkZgrvYl3VxPzL82eRcT6ZIQPtfqOKZZcdMSFrFh1AMIQa3MWhSdEXPcaJ0q B4Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=mxNgi5eq9511HNY5LdVDSdNyR6TzkCgPtS2W9kQq+ik=; b=NM3cN6dCGuftswCv7hyiDJPcR6To/CHTJqMTH4lfGUKi31ypTOg4p3FZ0JY8+ntOCj SJl0+75J+jxjLoWfCcVnaCqyglPny2bfg7w6taDYk+7VqVcXaLAxH5xCINPE2Lle+PlL 8V1H/hbQ9pzUjNl8RUMuAPuXn7R2nxTucHjPm6z+CwMUmgJGkpASMHRNy1p9BBQG4I/t HgtondZ3o4TkB7uNwblaJyTpkMbKay6gjTwd9uxn8wyG3iCv+cYvmC79SAzP3i1yrqEM UCEUcGRUAPj64VI7zPyxNps6StYf7PCRJgVe+90te8OzkhbJx66w19crNbWcS+WFY3Ex VX7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si9933703pfn.31.2019.04.02.06.48.13; Tue, 02 Apr 2019 06:48:29 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732058AbfDBNq6 (ORCPT + 99 others); Tue, 2 Apr 2019 09:46:58 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43102 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731412AbfDBNkE (ORCPT ); Tue, 2 Apr 2019 09:40:04 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJdx-0002oY-0J; Tue, 02 Apr 2019 14:40:01 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdw-0004tt-FI; Tue, 02 Apr 2019 14:40:00 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Saeed Mahameed" , "Leon Romanovsky" Date: Tue, 02 Apr 2019 14:38:27 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 43/99] net/mlx5: Continue driver initialization despite debugfs failure In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Leon Romanovsky commit 199fa087dc6b503baad06712716fac645a983e8a upstream. 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 [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -313,9 +313,9 @@ int mlx5_dev_init(struct mlx5_core_dev * INIT_LIST_HEAD(&priv->pgdir_list); spin_lock_init(&priv->mkey_lock); - priv->dbg_root = debugfs_create_dir(dev_name(&pdev->dev), mlx5_debugfs_root); - if (!priv->dbg_root) - return -ENOMEM; + if (mlx5_debugfs_root) + priv->dbg_root = + debugfs_create_dir(pci_name(pdev), mlx5_debugfs_root); err = pci_enable_device(pdev); if (err) {