archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <>
To: Robert Marko <>
Cc: Guenter Roeck <>,
	Jean Delvare <>,,
Subject: [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code
Date: Fri, 18 Jun 2021 16:46:01 +0300	[thread overview]
Message-ID: <YMyjmR54ErLtc1sH@mwanda> (raw)

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 <>
 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
 	debugfs_dir = debugfs_create_dir(client->name, root);
-	if (!debugfs_dir)
-		return;

             reply	other threads:[~2021-06-18 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:46 Dan Carpenter [this message]
2021-06-18 19:47 ` [PATCH] hwmon: (pmbus/dps920ab) Delete some dead code Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMyjmR54ErLtc1sH@mwanda \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).