From: Jaehoon Chung Date: Tue, 7 Jan 2025 00:45:57 +0000 (+0900) Subject: soc: spacemit: pm_domain: Add return -EINVAL in notifier_call X-Git-Tag: accepted/tizen/unified/20250514.114144~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=510d6a16df3fe30156c907a55c29ea5a7aea4452;p=platform%2Fkernel%2Flinux-riscv.git soc: spacemit: pm_domain: Add return -EINVAL in notifier_call If action is not matched with anything, it needs to return with value. lock/unlock will be a pair. Otherwise unlock is called twice. Change-Id: I4eb3955572635257eb5bdf992c201c5efb509495 Signed-off-by: Jaehoon Chung --- diff --git a/drivers/soc/spacemit/pm_domain/k1x-pm_domain.c b/drivers/soc/spacemit/pm_domain/k1x-pm_domain.c index 49f4f6dd8345..b7c10cd2e556 100644 --- a/drivers/soc/spacemit/pm_domain/k1x-pm_domain.c +++ b/drivers/soc/spacemit/pm_domain/k1x-pm_domain.c @@ -531,6 +531,7 @@ static int spacemit_cpuidle_qos_notfier_call(struct notifier_block *nb, unsigned default: pr_warn("Invalidate pm qos value\n"); spin_unlock(&spacemit_apcr_qos_lock); + return -EINVAL; } regmap_read(gpmu->regmap[MPMU_REGMAP_INDEX], MPMU_APCR_PER_REG, &apcr_per);