summaryrefslogtreecommitdiff
path: root/drivers/gpu/ipu-v3
diff options
context:
space:
mode:
authorTobias Jordan <Tobias.Jordan@elektrobit.com>2018-02-15 15:35:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:51:58 +0200
commit3ed913b61e6a3cde1e8ef93123e183dc5ea17e12 (patch)
treea86be0e9591abe8d127cf824860db487d340f061 /drivers/gpu/ipu-v3
parent9ccb1d53c6ac959abba61ba446585cb7f1c5b6c9 (diff)
gpu: ipu-v3: prg: fix device node leak in ipu_prg_lookup_by_phandle
[ Upstream commit 3addaba8141bc6a4f649a48f46e552af32922147 ] Before returning, call of_node_put() for the device node returned by of_parse_phandle(). Fixes: ea9c260514c1 ("gpu: ipu-v3: add driver for Prefetch Resolve Gasket") Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r--drivers/gpu/ipu-v3/ipu-prg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
index 0013ca9f72c8..cbccce8e594b 100644
--- a/drivers/gpu/ipu-v3/ipu-prg.c
+++ b/drivers/gpu/ipu-v3/ipu-prg.c
@@ -101,11 +101,14 @@ ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
mutex_unlock(&ipu_prg_list_mutex);
device_link_add(dev, prg->dev, DL_FLAG_AUTOREMOVE);
prg->id = ipu_id;
+ of_node_put(prg_node);
return prg;
}
}
mutex_unlock(&ipu_prg_list_mutex);
+ of_node_put(prg_node);
+
return NULL;
}