Skip to content

Commit 81332c1

Browse files
cvinayakcarlescufi
authored andcommitted
clock_control: nrf5: Return -EBUSY on turning off if still in use
Fix return value to -EBUSY instead of 0 when releasing a reference but not physically turning off the clock. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 1caea87 commit 81332c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clock_control/nrf5_power_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int _m16src_stop(struct device *dev, clock_control_subsys_t sub_system)
115115

116116
if (--m16src_ref) {
117117
irq_unlock(imask);
118-
return 0;
118+
return -EBUSY;
119119
}
120120

121121
if (m16src_grd) {

0 commit comments

Comments
 (0)