kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code
@ 2021-06-18 13:46 Dan Carpenter
  2021-06-18 19:47 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-06-18 13:46 UTC (permalink / raw)
  To: Robert Marko; +Cc: Guenter Roeck, Jean Delvare, linux-hwmon, kernel-janitors

The debugfs_create_dir() function returns error pointers, it doesn't
return NULL.  But debugfs functions don't need to be checked in normal
situations and we can just delete this code.

Fixes: 1f442e213ce5 ("hwmon: (pmbus) Add driver for Delta DPS-920AB PSU")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/hwmon/pmbus/dps920ab.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/hwmon/pmbus/dps920ab.c b/drivers/hwmon/pmbus/dps920ab.c
index bd2df2a3c8e3..d3941f6eb29a 100644
--- a/drivers/hwmon/pmbus/dps920ab.c
+++ b/drivers/hwmon/pmbus/dps920ab.c
@@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_client
 		return;
 
 	debugfs_dir = debugfs_create_dir(client->name, root);
-	if (!debugfs_dir)
-		return;
 
 	debugfs_create_file("mfr_id",
 			    0400,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-18 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 13:46 [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code Dan Carpenter
2021-06-18 19:47 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).