Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2586972lqp; Mon, 25 Mar 2024 03:39:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3zpkrosrlmGXfvX1ghYMsFRgwT6AlopLkud20X22x6bA2qg74dAGW3luyQUd0uvEhINZDXRNmKC7LB/noPAaIC3CuEJV235mw8oWPrQ== X-Google-Smtp-Source: AGHT+IFvJsua5OubrUrF9D43JVzYld2nprKKyWez0iagi114QPXCCiCXTAzybRiLLjgVz55+fj0q X-Received: by 2002:a17:903:120f:b0:1de:f82b:4c53 with SMTP id l15-20020a170903120f00b001def82b4c53mr8826482plh.12.1711363163698; Mon, 25 Mar 2024 03:39:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711363163; cv=pass; d=google.com; s=arc-20160816; b=qXDALlHNB7qRlAJgXVG7ek9brdJUEgEjXlH9yC+PbdvcYKyemDFacFf5/VGewPhEIl HJ7bGf4l7vVWP2ACNZtbLB1XFKSi0Y5w8DlhHQYGwJE/XsZak+BIoHth2KWAvCtI9WrB L5RKK/bq73ichwQN5aMVW5RJFBIVXgMh6xYeRmav8p04mEM5kKvCJVjHe4kh9/+iyVjN V6k8uL5bbZ2UhD6eC0s91UiSrZuLxW9tM3rZ/PHHCUovs+YZxjh/84MJEf1COd2EZtqy 2Ccb4gxo2XRdw9WlxYKe4JRrS4PqCqjCPEaFZ23cFouNUmJf1lio9LV9Rq2tabxXlhxr 5FUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yWa9aJztc/3SfUKYvyWbPE/4qkfJsZ5Lt83QFzdjQdE=; fh=8lKkxqHTiopHevjImvLlR4SH456bCwFvUbX1+xzGfos=; b=WNFEPeEAL68K2oz30mPPF3DwKGxnvLppr9oVLKX3Xtmth5rdelENWem4d+o31uLi3n MPYTZTk+DAjpSiS142anpQFZ8j9adhxBdVHWyJtBoe9yjZbd1om9w3Alp82u2xrYmH+w rv3RZ/68DRT0KQVzDFkkHkni/fExI63ECD2i15HDGeiysYF8BGJYk7eOEfgOlwEqfCcR UT/9RvuxALhz3rCHiOkgG6N93I0dKKZV1dCzZnyUqd+8WX25XZzgZYOZWhBlpaECsXjA uL33upxSghxKMkCiRcBRsi/qGP4p2gUEi0q1gDjp3teVaPLIa4y05Hgz+PxfcGJaYGMz qeXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YT83ap+C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116133-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q9-20020a170902eb8900b001e00191fb89si4979878plg.372.2024.03.25.03.39.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YT83ap+C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116133-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DA420B3664B for ; Mon, 25 Mar 2024 10:12:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C14C3AD97A; Mon, 25 Mar 2024 03:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YT83ap+C" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 312592811B5; Sun, 24 Mar 2024 23:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323676; cv=none; b=sPCcIZA5t3vUf8VnEsYueGKCCYafyUsnGAAWN+OI/Q/oVH4EQNltbYP8WU4yzmwFu1uKoB7nsQrH+Ac8Tq4fJwoy13/2w8VKznpDQ/likfEAEJ+U8fZEB9rUu9ko4VF6wrNkRD/72CNvaWw5Fdf832kQmHEFNQV7GPY7sHYjB1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323676; c=relaxed/simple; bh=dMAyWF23agArvAO80uHD1LcxVbaqvdgHxmgzfLuynDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lNSDbi8wxRGRsjPwnqcx00vTS037f0pDjg/6hM1st49V13bcR1pi6pgi9g/CP3VE21BZTDwLFVfwnieSrsUQz2ABY7atwMWcrJjY1x0CONw9XBWkX+97eK0dyDd4LyWL93DiTglM7gSdAk2FECQQew2DK7rEiwtIf4Mlyrc2Zq4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YT83ap+C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 550FDC433A6; Sun, 24 Mar 2024 23:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323676; bh=dMAyWF23agArvAO80uHD1LcxVbaqvdgHxmgzfLuynDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YT83ap+CH98fD2uRGUBHZ149uOmTz76scSt8H6FLDe/q48GQ8eIFwFZk7896Ch9rO fvBjMxjo+chQjVQ8A81oXKaJsX/GAiOPpj1+o+kDpOYQtyRO4nk5a/q7iRsv0ci2TK 7UG90q7gEmY0pEjQweWQzK/fm7MblcTj++piaYwcywOQM6lvezM+SoPxgpwcp9Ai9b T5g2HwE1sOxgcmD+y1RBmbCBdxZScvmc3UvC7d8oAqsVuFa3r1mbceY+oSZnjg6d/4 84Q8Mof1vYhU8fq81PwP8eSmPHB9UnVurMRWudBBaeyDBkzGxTnw9WJBqCAJ5riU8x tM+l+5Wm8Iy/A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jinjie Ruan , Russell King , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 048/238] wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir() Date: Sun, 24 Mar 2024 19:37:16 -0400 Message-ID: <20240324234027.1354210-49-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jinjie Ruan [ Upstream commit 50180c7f8e3de7c2d87f619131776598fcb1478d ] debugfs_create_dir() returns ERR_PTR and never return NULL. As Russell suggested, this patch removes the error checking for debugfs_create_dir(). This is because the DebugFS kernel API is developed in a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes. The debugfs APIs have a IS_ERR() judge in start_creating() which can handle it gracefully. So these checks are unnecessary. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Jinjie Ruan Suggested-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/20230903030216.1509013-3-ruanjinjie@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c b/drivers/net/wireless/marvell/mwifiex/debugfs.c index 1e7dc724c6a94..d48a3e0b36060 100644 --- a/drivers/net/wireless/marvell/mwifiex/debugfs.c +++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c @@ -976,9 +976,6 @@ mwifiex_dev_debugfs_init(struct mwifiex_private *priv) priv->dfs_dev_dir = debugfs_create_dir(priv->netdev->name, mwifiex_dfs_dir); - if (!priv->dfs_dev_dir) - return; - MWIFIEX_DFS_ADD_FILE(info); MWIFIEX_DFS_ADD_FILE(debug); MWIFIEX_DFS_ADD_FILE(getlog); -- 2.43.0