[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180528100323.950633179@linuxfoundation.org>
Date: Mon, 28 May 2018 11:58:02 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Tobias Jordan <Tobias.Jordan@...ktrobit.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.14 097/496] gpu: ipu-v3: pre: fix device node leak in ipu_pre_lookup_by_phandle
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
[ Upstream commit c795f3052b60b01e80485fad98c53e5e67d093c9 ]
Before returning, call of_node_put() for the device node returned by
of_parse_phandle().
Fixes: d2a34232580a ("gpu: ipu-v3: add driver for Prefetch Resolve Engine")
Signed-off-by: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/ipu-v3/ipu-pre.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/gpu/ipu-v3/ipu-pre.c
+++ b/drivers/gpu/ipu-v3/ipu-pre.c
@@ -125,11 +125,14 @@ ipu_pre_lookup_by_phandle(struct device
if (pre_node == pre->dev->of_node) {
mutex_unlock(&ipu_pre_list_mutex);
device_link_add(dev, pre->dev, DL_FLAG_AUTOREMOVE);
+ of_node_put(pre_node);
return pre;
}
}
mutex_unlock(&ipu_pre_list_mutex);
+ of_node_put(pre_node);
+
return NULL;
}
Powered by blists - more mailing lists