We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 701dafe commit 50c8ab8Copy full SHA for 50c8ab8
drivers/acpi/arm64/iort.c
@@ -388,6 +388,7 @@ static struct acpi_iort_node *iort_node_get_id(struct acpi_iort_node *node,
388
static int iort_get_id_mapping_index(struct acpi_iort_node *node)
389
{
390
struct acpi_iort_smmu_v3 *smmu;
391
+ struct acpi_iort_pmcg *pmcg;
392
393
switch (node->type) {
394
case ACPI_IORT_NODE_SMMU_V3:
@@ -415,6 +416,10 @@ static int iort_get_id_mapping_index(struct acpi_iort_node *node)
415
416
417
return smmu->id_mapping_index;
418
case ACPI_IORT_NODE_PMCG:
419
+ pmcg = (struct acpi_iort_pmcg *)node->node_data;
420
+ if (pmcg->overflow_gsiv || node->mapping_count == 0)
421
+ return -EINVAL;
422
+
423
return 0;
424
default:
425
return -EINVAL;
0 commit comments