diff options
author | wen yang <yellowriver2010@hotmail.com> | 2019-02-05 08:07:26 +0300 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2019-02-07 07:03:02 +0300 |
commit | 99e5a8df8b3627239ecef09547931a81618d0851 (patch) | |
tree | c983bb28224130d6fe49e59c84a6d8e291f872a2 /drivers/soc | |
parent | bfeffd155283772bbe78c6a05dec7c0128ee500c (diff) | |
download | linux-99e5a8df8b3627239ecef09547931a81618d0851.tar.xz |
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')
-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); |