Skip to contentSkip to conversation

adm1266.c: Fix error checking for debugfs_create_dir

PATCH Superseded Osama Muhammad 1 participant 1 message May 25, 2023 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 adm1266.c: Fix error checking for debugfs_create_dir

This patch fixes the error checking in adm1266. 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.

---

changes since v1:
-Dropped the error checking for debugfs_create_dir

---
 drivers/hwmon/pmbus/adm1266.c | 2 --
 1 file changed, 2 deletions(-)
drivers/hwmon/pmbus/adm1266.c +0 -2
index d88b6115b42e..184d75269d2b 100644
@@ -340,8 +340,6 @@ static void adm1266_init_debugfs(struct adm1266_data *data)
 		return;
 
 	data->debugfs_dir = debugfs_create_dir(data->client->name, root);
-	if (IS_ERR(data->debugfs_dir))
-		return;
 
 	debugfs_create_devm_seqfile(&data->client->dev, "sequencer_state", data->debugfs_dir,
 				    adm1266_state_read);
Signature · 1 line
2.34.1