Skip to content

Commit 1c7442d

Browse files
pksublimerafaeljw
authored andcommitted
PM: EM: Documentation: Fix bug in example code snippet
A semicolon was mistakenly placed at the end of 'if' statements. If example is copied as-is, it would lead to the subsequent return being executed unconditionally, which is incorrect, and the rest of the function would never be reached. Signed-off-by: Patrick Little <plittle@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> [ rjw: Subject adjustment ] Link: https://patch.msgid.link/20260128-documentation-fix-grammar-v1-2-39238dc471f9@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent e79eec6 commit 1c7442d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Documentation/power/energy-model.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ EM framework::
308308
05
309309
06 /* Use the 'foo' protocol to ceil the frequency */
310310
07 freq = foo_get_freq_ceil(dev, *KHz);
311-
08 if (freq < 0);
311+
08 if (freq < 0)
312312
09 return freq;
313313
10
314314
11 /* Estimate the power cost for the dev at the relevant freq. */
315315
12 power = foo_estimate_power(dev, freq);
316-
13 if (power < 0);
316+
13 if (power < 0)
317317
14 return power;
318318
15
319319
16 /* Return the values to the EM framework */

0 commit comments

Comments
 (0)