Skip to content

Commit 9dc2b61

Browse files
wjablon1lgirdwood
authored andcommitted
ipc4: handler-user: fix error code for unresolved modules
In the context of Config Get/Set, when the target module instance cannot be resolved, FW should report INVALID_RESOURCE_ID. MOD_INVALID_ID should be reserved for other module-related IPCs. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
1 parent 705a085 commit 9dc2b61

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/ipc/ipc4/handler-user.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ static int ipc4_set_get_config_module_instance(struct ipc4_message_request *ipc4
809809
comp_id = IPC4_COMP_ID(config->primary.r.module_id, config->primary.r.instance_id);
810810
dev = ipc4_get_comp_dev(comp_id);
811811
if (!dev)
812-
return IPC4_MOD_INVALID_ID;
812+
return IPC4_INVALID_RESOURCE_ID;
813813

814814
drv = dev->drv;
815815

@@ -821,7 +821,7 @@ static int ipc4_set_get_config_module_instance(struct ipc4_message_request *ipc4
821821
}
822822

823823
if (!drv)
824-
return IPC4_MOD_INVALID_ID;
824+
return IPC4_INVALID_RESOURCE_ID;
825825

826826
function = set ? drv->ops.set_attribute : drv->ops.get_attribute;
827827
if (!function)
@@ -996,7 +996,7 @@ __cold static int ipc4_get_large_config_module_instance(struct ipc4_message_requ
996996
config.primary.r.instance_id);
997997
dev = ipc4_get_comp_dev(comp_id);
998998
if (!dev)
999-
return IPC4_MOD_INVALID_ID;
999+
return IPC4_INVALID_RESOURCE_ID;
10001000

10011001
drv = dev->drv;
10021002

@@ -1008,7 +1008,7 @@ __cold static int ipc4_get_large_config_module_instance(struct ipc4_message_requ
10081008
}
10091009

10101010
if (!drv)
1011-
return IPC4_MOD_INVALID_ID;
1011+
return IPC4_INVALID_RESOURCE_ID;
10121012

10131013
if (!drv->ops.get_large_config)
10141014
return IPC4_INVALID_REQUEST;
@@ -1041,7 +1041,7 @@ __cold static int ipc4_get_large_config_module_instance(struct ipc4_message_requ
10411041

10421042
/* set up ipc4 error code for reply data */
10431043
if (ret < 0)
1044-
ret = IPC4_MOD_INVALID_ID;
1044+
ret = IPC4_INVALID_RESOURCE_ID;
10451045

10461046
/* Copy host config and overwrite */
10471047
reply.extension.dat = config.extension.dat;
@@ -1165,7 +1165,7 @@ __cold static int ipc4_set_large_config_module_instance(struct ipc4_message_requ
11651165
comp_id = IPC4_COMP_ID(config.primary.r.module_id, config.primary.r.instance_id);
11661166
dev = ipc4_get_comp_dev(comp_id);
11671167
if (!dev)
1168-
return IPC4_MOD_INVALID_ID;
1168+
return IPC4_INVALID_RESOURCE_ID;
11691169

11701170
drv = dev->drv;
11711171

@@ -1177,7 +1177,7 @@ __cold static int ipc4_set_large_config_module_instance(struct ipc4_message_requ
11771177
}
11781178

11791179
if (!drv)
1180-
return IPC4_MOD_INVALID_ID;
1180+
return IPC4_INVALID_RESOURCE_ID;
11811181

11821182
if (!drv->ops.set_large_config)
11831183
return IPC4_INVALID_REQUEST;

0 commit comments

Comments
 (0)