Skip to content

Commit 135214d

Browse files
ydamigosmmahadevan108
authored andcommitted
driver/dma_smartbond: Fix driver initialization when PM_DEVICE is set
Fix DMA driver initialization when PM_DEVICE is set. Don't put PM policy state lock if it is not active. Signed-off-by: Ioannis Damigos <[email protected]>
1 parent a66c070 commit 135214d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/dma_smartbond.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ static inline void dma_smartbond_pm_policy_state_lock_get(void)
188188
static inline void dma_smartbond_pm_policy_state_lock_put(void)
189189
{
190190
#if defined(CONFIG_PM_DEVICE)
191-
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
191+
if (pm_policy_state_lock_is_active(PM_STATE_STANDBY, PM_ALL_SUBSTATES)) {
192+
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
193+
}
192194
#endif
193195
}
194196

0 commit comments

Comments
 (0)