Skip to content

Commit 76a6fc5

Browse files
Dan Carpentervireshk
authored andcommitted
cpufreq: sun50i: fix error returns in dt_has_supported_hw()
The dt_has_supported_hw() function returns type bool. That means these negative error codes are cast to true but the function should return false instead. Fixes: fa5aec9 ("cpufreq: sun50i: Add support for opp_supported_hw") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent fa7bd98 commit 76a6fc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/sun50i-cpufreq-nvmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ static bool dt_has_supported_hw(void)
136136

137137
cpu_dev = get_cpu_device(0);
138138
if (!cpu_dev)
139-
return -ENODEV;
139+
return false;
140140

141141
np = dev_pm_opp_of_get_opp_desc_node(cpu_dev);
142142
if (!np)
143-
return -ENOENT;
143+
return false;
144144

145145
for_each_child_of_node(np, opp) {
146146
if (of_find_property(opp, "opp-supported-hw", NULL)) {

0 commit comments

Comments
 (0)