Commit eb833367 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ulf Hansson

OPP: fix error code in dev_pm_opp_set_config()

This is an error path so set the error code.  Smatch complains about the
current code:

    drivers/opp/core.c:2660 dev_pm_opp_set_config()
    error: uninitialized symbol 'ret'.

Fixes: e37440e7 ("OPP: Call dev_pm_opp_set_opp() for required OPPs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/3f3660af-4ea0-4a89-b3b7-58de7b16d7a5@stanley.mountainSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 9852d85e
......@@ -2630,8 +2630,10 @@ int dev_pm_opp_set_config(struct device *dev, struct dev_pm_opp_config *config)
/* Attach genpds */
if (config->genpd_names) {
if (config->required_devs)
if (config->required_devs) {
ret = -EINVAL;
goto err;
}
ret = _opp_attach_genpd(opp_table, dev, config->genpd_names,
config->virt_devs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment