diff options
author | wen yang <yellowriver2010@hotmail.com> | 2019-02-05 06:07:26 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2019-02-07 05:03:02 +0100 |
commit | 99e5a8df8b3627239ecef09547931a81618d0851 (patch) | |
tree | c983bb28224130d6fe49e59c84a6d8e291f872a2 /drivers/soc/amlogic | |
parent | Linux 5.0-rc1 (diff) | |
download | linux-99e5a8df8b3627239ecef09547931a81618d0851.tar.xz linux-99e5a8df8b3627239ecef09547931a81618d0851.zip |
soc: amlogic: add missing of_node_put()
The call to of_parse_phandle returns a node pointer with refcount
incremented thus it must be explicitly decremented here after the last
usage.
Signed-off-by: Wen Yang <yellowriver2010@hotmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Fixes: d4983983d987 ("soc: amlogic: add meson-canvas driver")
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'drivers/soc/amlogic')
-rw-r--r-- | drivers/soc/amlogic/meson-canvas.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c index fce33ca76bb6..87a6c6e23591 100644 --- a/drivers/soc/amlogic/meson-canvas.c +++ b/drivers/soc/amlogic/meson-canvas.c @@ -57,9 +57,12 @@ struct meson_canvas *meson_canvas_get(struct device *dev) return ERR_PTR(-ENODEV); canvas_pdev = of_find_device_by_node(canvas_node); - if (!canvas_pdev) + if (!canvas_pdev) { + of_node_put(canvas_node); return ERR_PTR(-EPROBE_DEFER); + } + of_node_put(canvas_node); return dev_get_drvdata(&canvas_pdev->dev); } EXPORT_SYMBOL_GPL(meson_canvas_get); |