summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2026-09-16 21:23:47 +0500
committerLee Jones <lee@kernel.org>2026-09-24 15:12:57 +0100
commitb761214ac8d48f20be2e76d415762bce05474f55 (patch)
treea636e6dadfc8ad052e8684fb48322a640aa9e0d4
parent3c5c55d979ddcb0765ce531bc7ba173c87c8712a (diff)
mfd: intel-lpss: Remove redundant DebugFS error check
The DebugFS API is designed to handle errors gracefully. Any explicit checking on return values is considered an anti-pattern. This patch removes unnecessary error checking and converts intel_lpss_debugfs_add() into a void function. Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260916-intel-lpss-debugfs-v7-1-eb51d41f55e0@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/intel-lpss.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 63d6694f7145..b6958e99cf54 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -142,13 +142,11 @@ static void intel_lpss_cache_ltr(struct intel_lpss *lpss)
lpss->idle_ltr = readl(lpss->priv + LPSS_PRIV_IDLELTR);
}
-static int intel_lpss_debugfs_add(struct intel_lpss *lpss)
+static void intel_lpss_debugfs_add(struct intel_lpss *lpss)
{
struct dentry *dir;
dir = debugfs_create_dir(dev_name(lpss->dev), intel_lpss_debugfs);
- if (IS_ERR(dir))
- return PTR_ERR(dir);
/* Cache the values into lpss structure */
intel_lpss_cache_ltr(lpss);
@@ -158,7 +156,6 @@ static int intel_lpss_debugfs_add(struct intel_lpss *lpss)
debugfs_create_x32("idle_ltr", S_IRUGO, dir, &lpss->idle_ltr);
lpss->debugfs = dir;
- return 0;
}
static void intel_lpss_debugfs_remove(struct intel_lpss *lpss)
@@ -432,10 +429,7 @@ int intel_lpss_probe(struct device *dev,
goto err_clk_register;
intel_lpss_ltr_expose(lpss);
-
- ret = intel_lpss_debugfs_add(lpss);
- if (ret)
- dev_warn(dev, "Failed to create debugfs entries\n");
+ intel_lpss_debugfs_add(lpss);
if (intel_lpss_has_idma(lpss)) {
ret = mfd_add_devices(dev, lpss->devid, &intel_lpss_idma64_cell,