From: Dan Carpenter <dan.carpenter@oracle.com>
To: Robert Marko <robert.marko@sartura.hr>
Cc: Guenter Roeck <linux@roeck-us.net>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org
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 <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
next 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YMyjmR54ErLtc1sH@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robert.marko@sartura.hr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.