diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-22 16:21:17 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-07 09:58:32 +0530 |
commit | a2dea4cb907022447298d46b15a5c41f3f9903e6 (patch) | |
tree | c8b5eabcc87dcbcf6635c254153599aed5b6a638 /drivers/opp/core.c | |
parent | 1058d1efbc84e3b48d2130f46a149cea178b28a1 (diff) | |
download | linux-a2dea4cb907022447298d46b15a5c41f3f9903e6.tar.bz2 |
opp: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-pm@vger.kernel.org
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/core.c')
-rw-r--r-- | drivers/opp/core.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 57d88a275de0..fa15aa8e00b0 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -792,7 +792,6 @@ static struct opp_device *_add_opp_dev_unlocked(const struct device *dev, struct opp_table *opp_table) { struct opp_device *opp_dev; - int ret; opp_dev = kzalloc(sizeof(*opp_dev), GFP_KERNEL); if (!opp_dev) @@ -804,10 +803,7 @@ static struct opp_device *_add_opp_dev_unlocked(const struct device *dev, list_add(&opp_dev->node, &opp_table->dev_list); /* Create debugfs entries for the opp_table */ - ret = opp_debug_register(opp_dev, opp_table); - if (ret) - dev_err(dev, "%s: Failed to register opp debugfs (%d)\n", - __func__, ret); + opp_debug_register(opp_dev, opp_table); return opp_dev; } @@ -1175,10 +1171,7 @@ int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, new_opp->opp_table = opp_table; kref_init(&new_opp->kref); - ret = opp_debug_create_one(new_opp, opp_table); - if (ret) - dev_err(dev, "%s: Failed to register opp to debugfs (%d)\n", - __func__, ret); + opp_debug_create_one(new_opp, opp_table); if (!_opp_supported_by_regulators(new_opp, opp_table)) { new_opp->available = false; |