ucd9000.c: Drop error checking for debugfs_create_dir
PATCH 1/1 ucd9000.c: Drop error checking for debugfs_create_dir
This patch fixes the error checking in ucd9000.c. 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.
--- drivers/hwmon/pmbus/ucd9000.c | 2 -- 1 file changed, 2 deletions(-)
drivers/hwmon/pmbus/ucd9000.c +0 -2
@@ -512,8 +512,6 @@ static int ucd9000_init_debugfs(struct i2c_client *client,return -ENOENT ; data->debugfs =debugfs_create_dir (client->name, debugfs); -if (!data->debugfs) -return -ENOENT ;/* * Of the chips this driver supports, only the UCD9090, UCD90160,
Signature · 1 line
2.34.1
Guenter Roeck
maintainerQuoted 1 line · Osama Muhammad
This patch fixes the error checking in
ucd9000.c.
Sure, but you should also explain what is wrong with the code (i.e., that debugfs_create_dir() does not return NULL but an ERR_PTR after an error).
Quoted 4 lines
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.
If you plan t send more patches, please watch out for the subject line to match subject lines used in a subsystem. Here it should start with something like
hwmon: (pmbus/ucd9000) ...
Thanks,
Guenter
Quoted 21 lines
Signed-off-by Osama Muhammad <[email protected]>--- drivers/hwmon/pmbus/ucd9000.c | 2 -- 1 file changed, 2 deletions(-)drivers/hwmon/pmbus/ucd9000.c +0
-2@@ -512,8 +512,6 @@ static int ucd9000_init_debugfs(struct i2c_client *client,return -ENOENT ; data->debugfs =debugfs_create_dir (client->name, debugfs); -if (!data->debugfs) -return -ENOENT ;/* * Of the chips this driver supports, only the UCD9090, UCD90160, Signature · 1 line
2.34.1
Guenter Roeck
maintainerQuoted 11 lines · Osama Muhammad
Quoted 7 lines · Guenter Roeck
Quoted 1 line · Osama Muhammad
This patch fixes the error checking in
ucd9000.c.Sure, but you should also explain what is wrong with the code (i.e., that
debugfs_create_dir()does not return NULL but anERR_PTRafter an error).Should I send another version of the patch?
Please do.
Guenter
Quoted 46 lines
Quoted 7 lines
Quoted 6 lines
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.Quoted 7 lines
If you plan t send more patches, please watch out for the subject line to match subject lines used in a subsystem. Here it should start with something like
hwmon: (pmbus/ucd9000) ...
Thanks for the information and will keep it in mind while sending patches
afterwards.
Quoted 8 lines
Thanks,
GuenterQuoted 5 lines
Signed-off-by Osama Muhammad <[email protected]>--- drivers/hwmon/pmbus/ucd9000.c | 2 -- 1 file changed, 2 deletions(-)Quoted 18 lines
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/hwmon/pmbus/ucd9000.cdrivers/hwmon/pmbus/ucd9000.c static int ucd9000_init_debugfs(struct i2c_client
Quoted 4 lines
index
3daaf2237832..73559afa8ba7100644drivers/hwmon/pmbus/ucd9000.c +0
-0@@ -512,8 +512,6 @@ static int ucd9000_init_debugfs(struct i2c_client*client,
Quoted 11 lines
drivers/hwmon/pmbus/ucd9000.c +0
-3return -ENOENT ; data->debugfs =debugfs_create_dir (client->name, debugfs); -if (!data->debugfs) -return -ENOENT ;/* * Of the chips this driver supports, only the UCD9090, UCD90160, -- 2.34.1
Thanks,
Osmten