Skip to content

Commit eb83336

Browse files
Dan Carpenterstorulf
authored andcommitted
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: e37440e ("OPP: Call dev_pm_opp_set_opp() for required OPPs") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 9852d85 commit eb83336

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/opp/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2630,8 +2630,10 @@ int dev_pm_opp_set_config(struct device *dev, struct dev_pm_opp_config *config)
26302630

26312631
/* Attach genpds */
26322632
if (config->genpd_names) {
2633-
if (config->required_devs)
2633+
if (config->required_devs) {
2634+
ret = -EINVAL;
26342635
goto err;
2636+
}
26352637

26362638
ret = _opp_attach_genpd(opp_table, dev, config->genpd_names,
26372639
config->virt_devs);

0 commit comments

Comments
 (0)