36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From b70d76d5c20b3fb32e01986568c695da5879106b Mon Sep 17 00:00:00 2001
|
|
From: veega2022 <zhuweijia@huawei.com>
|
|
Date: Sat, 10 Dec 2022 18:07:54 +0800
|
|
Subject: [PATCH] socip: Return -EINVAL when the parameter check fails
|
|
|
|
Return -EINVAL when the parameter check fails
|
|
|
|
Signed-off-by: fangjian <f.fangjian@huawei.com>
|
|
---
|
|
socip/hikp_socip_dumpreg.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/socip/hikp_socip_dumpreg.c b/socip/hikp_socip_dumpreg.c
|
|
index 088f5dd..b74dac8 100644
|
|
--- a/socip/hikp_socip_dumpreg.c
|
|
+++ b/socip/hikp_socip_dumpreg.c
|
|
@@ -131,6 +131,7 @@ static void hikp_socip_dumpreg_execute(struct major_cmd_ctrl *self)
|
|
struct hikp_cmd_ret *cmd_ret;
|
|
|
|
if (!check_socip_dumpreg_param()) {
|
|
+ self->err_no = -EINVAL;
|
|
cmd_socip_dump_help(self, NULL);
|
|
return;
|
|
}
|
|
@@ -141,6 +142,7 @@ static void hikp_socip_dumpreg_execute(struct major_cmd_ctrl *self)
|
|
hikp_cmd_init(&req_header, SOCIP_MOD, HIKP_SOCIP_CMD_DUMPREG, param[MODULE_ID_INDEX].val);
|
|
cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
|
if (!cmd_ret) {
|
|
+ self->err_no=-EINVAL;
|
|
HIKP_ERROR_PRINT("hikp_cmd_alloc\n");
|
|
return;
|
|
}
|
|
--
|
|
2.33.0
|
|
|