summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-08-25 17:00:10 -0700
committerOlof Johansson <olof@lixom.net>2016-08-25 17:00:10 -0700
commit8184a34f1124c6529611c3e77e361f087ce2ee1c (patch)
treef157bfe663b65c7ee882b9783b58d072670ff3c2 /drivers
parent84ba04f26d20d2f91516cd9078e5035f2c8c6087 (diff)
parentb079bd555f6060cd6b435a1eb58ec3b8d255ebd0 (diff)
Merge tag 'vexpress-fixes-4.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes
SCPI/Vexpress fixes for v4.8-rc Couple of minor fixes to add missing of_node_put after calling of_parse_phandle in SCPI and vexpress-config bus drivers(Peter Chen) * tag 'vexpress-fixes-4.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: add missing of_node_put after calling of_parse_phandle bus: vexpress-config: add missing of_node_put after calling of_parse_phandle Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bus/vexpress-config.c1
-rw-r--r--drivers/firmware/arm_scpi.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index c3cb76b363c6..9efdf1de4035 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
parent = class_find_device(vexpress_config_class, NULL, bridge,
vexpress_config_node_match);
+ of_node_put(bridge);
if (WARN_ON(!parent))
return -ENODEV;
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 438893762076..ce2bc2a38101 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -709,9 +709,10 @@ static int scpi_probe(struct platform_device *pdev)
struct mbox_client *cl = &pchan->cl;
struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
- if (of_address_to_resource(shmem, 0, &res)) {
+ ret = of_address_to_resource(shmem, 0, &res);
+ of_node_put(shmem);
+ if (ret) {
dev_err(dev, "failed to get SCPI payload mem resource\n");
- ret = -EINVAL;
goto err;
}