PCI: of_property: Return error for int_map allocation failure
authorDuoming Zhou <duoming@zju.edu.cn>
Sun, 3 Mar 2024 10:57:29 +0000 (18:57 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 2 May 2024 22:15:01 +0000 (17:15 -0500)
commite6f7d27df5d208b50cae817a91d128fb434bb12c
treea778aa2472193bd5180b209b52ca0aa167a76a2d
parent4cece764965020c22cff7665b18a012006359095
PCI: of_property: Return error for int_map allocation failure

Return -ENOMEM from of_pci_prop_intr_map() if kcalloc() fails to prevent a
NULL pointer dereference in this case.

Fixes: 407d1a51921e ("PCI: Create device tree node for bridge")
Link: https://lore.kernel.org/r/20240303105729.78624-1-duoming@zju.edu.cn
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/of_property.c