Update some patch for uadk from mainline. To get more infomation, please visit the homepage: https://github.com/Linaro/uadk Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
46 lines
1.2 KiB
Diff
46 lines
1.2 KiB
Diff
From d554782317fb25319690c2f6453994494a0396d0 Mon Sep 17 00:00:00 2001
|
|
From: JunchongPan <panjunchong@hisilicon.com>
|
|
Date: Thu, 10 Mar 2022 20:58:46 +0800
|
|
Subject: [PATCH 087/109] uadk/qm_udrv: Modify goto err_out
|
|
|
|
In setup_region, when mmap_qfr return NULL, don't need
|
|
to set sq_base/mmio_base NULL, return ENOMEM direct.
|
|
|
|
Signed-off-by: JunchongPan <panjunchong@hisilicon.com>
|
|
---
|
|
drv/hisi_qm_udrv.c | 9 ++-------
|
|
1 file changed, 2 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/drv/hisi_qm_udrv.c b/drv/hisi_qm_udrv.c
|
|
index 2e692a1..906dfa3 100644
|
|
--- a/drv/hisi_qm_udrv.c
|
|
+++ b/drv/hisi_qm_udrv.c
|
|
@@ -168,22 +168,17 @@ static int hisi_qm_setup_region(handle_t h_ctx,
|
|
q_info->sq_base = wd_ctx_mmap_qfr(h_ctx, UACCE_QFRT_DUS);
|
|
if (!q_info->sq_base) {
|
|
WD_ERR("mmap dus fail\n");
|
|
- goto err_out;
|
|
+ return -WD_ENOMEM;
|
|
}
|
|
|
|
q_info->mmio_base = wd_ctx_mmap_qfr(h_ctx, UACCE_QFRT_MMIO);
|
|
if (!q_info->mmio_base) {
|
|
wd_ctx_unmap_qfr(h_ctx, UACCE_QFRT_DUS);
|
|
WD_ERR("mmap mmio fail\n");
|
|
- goto err_out;
|
|
+ return -WD_ENOMEM;
|
|
}
|
|
|
|
return 0;
|
|
-
|
|
-err_out:
|
|
- q_info->sq_base = NULL;
|
|
- q_info->mmio_base = NULL;
|
|
- return -WD_ENOMEM;
|
|
}
|
|
|
|
static void hisi_qm_unset_region(handle_t h_ctx,
|
|
--
|
|
2.27.0
|
|
|