From nobody Fri Dec 19 20:14:06 2025 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 95DCE292B87; Sun, 24 Mar 2024 23:50:54 +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=1711324254; cv=none; b=Y8KTpw2HWUaPRSG1s0zXV2VYz9Ffnx/Xr1KagHvN/+nnDojN2Z9qop8qMt1XgZu99RjJRD0WCLsZfo7m06JOhYceamFsyksV/1wmxZEsuyHpI7SSifDWxHjQdt4e0LEjD3aj+kKy4y5u3Mw78ycxBmknjoWw1iyKeJSIEpeCxJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324254; c=relaxed/simple; bh=7XJBJ3ssNqsZXuFbQT4PN2MmLcu/dCRwK9QCwYai6S0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fwm+sW+i20aRsYqZH4JM5NBSk9HMoxh2FH+SH7GpK8irP/B/L4FOOjBeV7yciczPDawccKCAelQUPzXPnnUI+cE348dK5ZjjWiD7LJjCJqfLQ8f6M29BG++INXBC+AtlLG75FwSxV/TdWUTz5Jp6HDXVxnE9I6kX03vu5yKcXQw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zk47uWqI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zk47uWqI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE274C433C7; Sun, 24 Mar 2024 23:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324254; bh=7XJBJ3ssNqsZXuFbQT4PN2MmLcu/dCRwK9QCwYai6S0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zk47uWqIy/e0+h7AGoXGOgQFosoM8Pbq2UlvCtLsNaTp1lt6BTSJf8M20CY9do7tU Gf61Ww/Ep4oPF6Bd8Hm3cVtKTdK+Lq6OOSNOMcykuxG6yM76WTSuDl7SMoBTjR4G/p jtGs4UfafjWja73+hv75L2fEWoYT8f87P/6bTMLoJwMX8hfVf6aXl5KM6y5YSw34NQ 7FipvyiUTiSZjtMTS4X7oGpfdSRF1OmetCow4czCsRbEQxr9Xh4zg8c9Bvg/xTIGQs HmjJFPO4ykd8FxAKk5prjQ+4FgIx8DbjnQZnWzoi1eKJf3zqNXI+EcG7ljbWdK9uxi uJcMJubQf+/6g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jinjie Ruan , Russell King , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 035/148] wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir() Date: Sun, 24 Mar 2024 19:48:19 -0400 Message-ID: <20240324235012.1356413-36-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324235012.1356413-1-sashal@kernel.org> References: <20240324235012.1356413-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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/w= ireless/marvell/mwifiex/debugfs.c index 0f62da50e11a2..63af04202d75f 100644 --- a/drivers/net/wireless/marvell/mwifiex/debugfs.c +++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c @@ -977,9 +977,6 @@ mwifiex_dev_debugfs_init(struct mwifiex_private *priv) priv->dfs_dev_dir =3D debugfs_create_dir(priv->netdev->name, mwifiex_dfs_dir); =20 - if (!priv->dfs_dev_dir) - return; - MWIFIEX_DFS_ADD_FILE(info); MWIFIEX_DFS_ADD_FILE(debug); MWIFIEX_DFS_ADD_FILE(getlog); --=20 2.43.0