Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2525737lqp; Mon, 25 Mar 2024 01:08:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJkSgxCT3QfXxWJM64x59WWV/BOpnltXyC3FgKrHcyWmqekZ0NjqO++I6PLawQOGapeurjA43OsrdTH4o9lsqwdY7cqCUB9ZIKZDWwMg== X-Google-Smtp-Source: AGHT+IE7zCZYHQui6kFG/4LZsjCXc4Hdqz98FAyTTKLYYfmUltoZvgDl9r0BBfEF9BrIHcT+XBXN X-Received: by 2002:a05:6358:788:b0:17f:5a02:f6cb with SMTP id n8-20020a056358078800b0017f5a02f6cbmr7783489rwj.2.1711354116894; Mon, 25 Mar 2024 01:08:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711354116; cv=pass; d=google.com; s=arc-20160816; b=dD22Vx8L/iCJdGOV7eZNRd/k5mWpS7xvcwzl7pW9yXgI3s13S+CpT1n9vohuHubFeM Z8Dq4WSb7XMzdg/BxBll/qRY2xdcnx67JIV4nIuirHu+pJW35flmQD0ZbhdSiqKwuV2F uVfa3/4nTSerTUO2XB4OREJBNIu1qURllamfOMSESYFFFzXCKL1TrvRAecJER9ntlqx0 o8qlOnKbcqTwcEmMm0ip3hQmsbQeQ3zep1Q6X5MvlExJG4MMbedxIW7zTB5UzSiw3t84 oZ3sPnHM6ubxzW96M2cR7uHZ3VRJbcSp/KrF/6sB7wwpjFSBnw9kGwHaVi/IDA/OD6j5 JxXw== 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=ioem1oAku7XCJNs3J90IVLbocuC1fiKjfwYnvY6Gsj4=; fh=8lKkxqHTiopHevjImvLlR4SH456bCwFvUbX1+xzGfos=; b=UhG8lUb6pzXlG+egWlrKDCjl9wI7lc/mR3OcJiWSha1lZTUQ1JVKusqdprN3YFXBYB U4oVLS2p4xr2gXkfwYmWFNDXjq7LJj4Z3QhVmEJtv0X9H6fo/rbM7L4vBMr2sD5X81Mb 8kwBfU+lTwWnG018S6HtyFWrOtTut/AZr7ED1yx458HOItaO3bobz72bUhv9dxcVv74B dvNdBtjgMjR6dFM7JhVBqYld3AD7+Q22R2RFsSFqsO6JZ+CE6iYOndAcNvJWG83v2ACG liqU/LvQNyW2pU+KMIiP8BpgpWDzn4w87E2mdWLclH6zlDuCKky/X8ZN9ljG4JPDx1ue THow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LgfDWIlB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115864-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q62-20020a634341000000b005dcc036c679si6773672pga.677.2024.03.25.01.08.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:08:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115864-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LgfDWIlB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115864-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115864-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 898FE295EBE for ; Mon, 25 Mar 2024 08:08:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88D01380817; Mon, 25 Mar 2024 03:02:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LgfDWIlB" 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 3AC4A535AB; Sun, 24 Mar 2024 23:13:41 +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=1711322021; cv=none; b=o45T4uPXs6cuqXhE4VH/hyvrrjq4s3hUwzvMtRM9Ulb8EsRcwobTWLOB3NII/otaX4NTNFoYpeDwaF3NAisQRqgOL0/KAjopqOFLoKMarKmCTjOtnjbGB9W8Zsh7CsW5Cf6l8/WlrOmd/JGE6rIAh1l5BDlZIIe/+Jf6p31yvb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322021; c=relaxed/simple; bh=aQivHdRDzH/uaTKCJGoM2Wbuj+eFNqRsoXYaBwP44/w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HFVRWYFsFKuc/gZJGwNZ9/KVmTRPPoooJfarljzSV8ytzJ67X82m2ku+9PHvsT/U/7fIO+ro/yHfkAjMhvetNxHJM8hWRkTIHoigvQbNiR7frB6drPUFN1F1bq2xkNPK4L1rR3zFJIlhCnjvQtYZmtYF+eJ2S/P8Uyd1ghlHkXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LgfDWIlB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 650D6C433A6; Sun, 24 Mar 2024 23:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322021; bh=aQivHdRDzH/uaTKCJGoM2Wbuj+eFNqRsoXYaBwP44/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LgfDWIlBEQiqjKnAf+Lfv0hqt38CUIxFzIj9EmPY0sPflW2vhl/KfUjoCUc/9z/ig ku+uSl1e8T8OREXfQ+YBH/iQdqoWbT9k64NW7RGanC8Y5cqN+S33qahodAFdFUumKZ 6CiswVRiNEElzoNqk3wQeA+Pr470mx4swV0UVlcbckLIHVCisAQuonPRmHGR/Em3UY YRlsIVvGNZxvwyB/zVjqjoRyTaBCaRZAy61gn0ENuxx2g2+uIq6koN3dj3qpOBcu5K ph4eNRNcu6US2jvZ6DdfaUTvdjeXGaLJ7tZoIW3q5ZI2drXEfr92SaIzXK4mEghoMO sTu9qXGFEqAXw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jinjie Ruan , Russell King , Kalle Valo , Sasha Levin Subject: [PATCH 6.1 093/451] wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir() Date: Sun, 24 Mar 2024 19:06:09 -0400 Message-ID: <20240324231207.1351418-94-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 63f232c723374..55ca5b287fe7f 100644 --- a/drivers/net/wireless/marvell/mwifiex/debugfs.c +++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c @@ -964,9 +964,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