From: Yifan Wu <wuyifan50@huawei.com> driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IDBQ74 ---------------------------------------------------------------------- Fix the issue by returning the original error code from hisi_soc_l3c_alloc_lock_reg_set, which makes it possible for the caller to distinguish between different failure scenarios. Fixes: e6ecc3b028b8 ("soc cache: Add framework driver for HiSilicon SoC cache") Signed-off-by: Yifan Wu <wuyifan50@huawei.com> Signed-off-by: Yushan Wang <wangyushan12@huawei.com> Signed-off-by: Hongye Lin <linhongye@h-partners.com> --- drivers/soc/hisilicon/hisi_soc_l3c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/hisi_soc_l3c.c b/drivers/soc/hisilicon/hisi_soc_l3c.c index e0bf6cc5b47d..258502c09e1b 100644 --- a/drivers/soc/hisilicon/hisi_soc_l3c.c +++ b/drivers/soc/hisilicon/hisi_soc_l3c.c @@ -239,7 +239,7 @@ static int hisi_soc_l3c_do_lock(struct hisi_soc_comp *l3c_comp, regset = hisi_soc_l3c_alloc_lock_reg_set(soc_l3c, addr, size); if (regset < 0) - return -EBUSY; + return regset; if (!hisi_l3c_lock_ctrl_wait_finished(soc_l3c, regset, HISI_L3C_LOCK_CTRL_LOCK_DONE)) { -- 2.33.0