提交 9e25f01b 编写于 作者: D Dan Carpenter 提交者: Guenter Roeck

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: NDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YMyjmR54ErLtc1sH@mwandaSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 f0000797
...@@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_client ...@@ -119,8 +119,6 @@ static void dps920ab_init_debugfs(struct dps920ab_data *data, struct i2c_client
return; return;
debugfs_dir = debugfs_create_dir(client->name, root); debugfs_dir = debugfs_create_dir(client->name, root);
if (!debugfs_dir)
return;
debugfs_create_file("mfr_id", debugfs_create_file("mfr_id",
0400, 0400,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册