hwmon: (pmbus/dps920ab) Delete some dead code
Subsystems (3)
PATCH 1/1 hwmon: (pmbus/dps920ab) Delete some dead code
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 <[email protected]>
--- drivers/hwmon/pmbus/dps920ab.c | 2 -- 1 file changed, 2 deletions(-)
drivers/hwmon/pmbus/dps920ab.c +0 -2
@@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_clientreturn ; debugfs_dir =debugfs_create_dir (client->name, root); -if (!debugfs_dir) -return ; debugfs_create_file("mfr_id", 0400,
Signature · 1 line
2.30.2
Quoted 6 lines · Dan Carpenter
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 <[email protected]>
Applied.
Thanks,
Guenter
Quoted 20 lines
--- drivers/hwmon/pmbus/dps920ab.c | 2 -- 1 file changed, 2 deletions(-)drivers/hwmon/pmbus/dps920ab.c +0
-2@@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_clientreturn ; debugfs_dir =debugfs_create_dir (client->name, root); -if (!debugfs_dir) -return ; debugfs_create_file("mfr_id", 0400,Signature · 1 line
2.30.2