IORT fixes as a fall-out from IORT SMMU changes:

* Fix return value when IORT code allocating platform
  devices fails, that is causing a successful return
  on failure
* Fix the indexing in iort_node_get_id() so that the correct
  mapping entry is used to return the correct IORT parent
  node resulting from the mapping
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABCAAGBQJYmHesAAoJEIKLOaai0TZ/bAAP+weX/2UGDFEGr/aRBDSAJkIM
dPnrhyfYKg+aB8vKHrMR6nqikwFqi/BcZz+hFJNat0EOwEiPYik7d1lOjB+kaklZ
tLYP+HHBYAgAbsD/q2zIss4yLAK4/8MlBRVMKWGiVGEyvqjXSeW+eEIi2Y4YtgFc
Uou2333MfyFt3JARRHqtGse9V/21Ut5JDZDEpF0BLHdGgZrs0fI4c6K3VFhAtBql
yk6EcTdbSghDy3WXbWDkOQ1qRR2QbAoVjMcCswFmoI7flEUw3hSInJJ04rZSiY8B
lKEk2J/t7r59+Es3nKg8by0hs9J1OJJGzmZmcakgIDa9sYnlXjCW3CWRIzFmJZxZ
vLLfiZXFVfgMJamCbkibnptypPhUf6H6SIjJW7rV2GxNXqIE8P79y2uUhEAvc82q
9/0gFupzVIFGWkbYx4h+AVghtZB1PjbPpqqdCPHcozQQBZSX4GcIgc/ucGlABo37
zAs9fjLxDBWEQSxeS7DE9Rb9+/QKrE8LcO3+3rmog1dmBNx+Cp/RhLlnzL5U3Tpe
5ySOdofm2TaHKQqRbiT/4XFkcy1jZdqY2dlST9ceJiRqGkdbmKSNggQl4vhVAjSb
b7RnHKJC98xzLN0Ttvf1o4GWHYAcAPttS+XBbCp3UzZSn1RqKnaabjJ9RXkeC7+A
ODTgu8r56wdFWcz5bBdx
=6Zxx
-----END PGP SIGNATURE-----
ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()

The function iort_add_smmu_platform_device() accidentally returns 0
(ie PTR_ERR(pdev) where pdev == NULL) if platform_device_alloc() fails;
fix the bug by returning a proper error value.

Fixes: 846f0e9e74a0 ("ACPI/IORT: Add support for ARM SMMU platform devices creation")
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[lorenzo.pieralisi@arm.com: improved commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 file changed