diff options
author | Tobias Jordan <Tobias.Jordan@elektrobit.com> | 2018-02-15 15:35:30 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2018-02-19 15:12:59 +0100 |
commit | 3addaba8141bc6a4f649a48f46e552af32922147 (patch) | |
tree | 1bb67ee2c11387eb33f5321155a38766fd983fac /drivers | |
parent | c795f3052b60b01e80485fad98c53e5e67d093c9 (diff) | |
download | linux-stable-3addaba8141bc6a4f649a48f46e552af32922147.tar.gz linux-stable-3addaba8141bc6a4f649a48f46e552af32922147.tar.bz2 linux-stable-3addaba8141bc6a4f649a48f46e552af32922147.zip |
gpu: ipu-v3: prg: fix device node leak in ipu_prg_lookup_by_phandle
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-prg.c | 3 |
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 067365c733c6..97b99500153d 100644 --- a/drivers/gpu/ipu-v3/ipu-prg.c +++ b/drivers/gpu/ipu-v3/ipu-prg.c @@ -102,11 +102,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; } |