linux-stable/drivers/soc/amlogic
Julia Lawall fdda0a6adc meson-gx-socinfo: add missing of_node_put after of_device_is_available
Add an of_node_put when a tested device node is not available.

The semantic patch that fixes this problem is as follows
(http://coccinelle.lip6.fr):

// <smpl>
@@
identifier f;
local idexpression e;
expression x;
@@

e = f(...);
... when != of_node_put(e)
    when != x = e
    when != e = x
    when any
if (<+...of_device_is_available(e)...+>) {
  ... when != of_node_put(e)
(
  return e;
|
+ of_node_put(e);
  return ...;
)
}
// </smpl>

Fixes: a9daaba296 ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-03-18 09:07:32 -07:00
..
Kconfig soc: amlogic: meson-clk-measure: Add missing REGMAP_MMIO dependency 2018-12-10 12:16:22 -08:00
Makefile soc: amlogic: Add Meson Clock Measure driver 2018-11-28 16:55:35 -08:00
meson-canvas.c soc: amlogic: canvas: Fix meson_canvas_get when probe failed 2019-02-07 16:31:30 -08:00
meson-clk-measure.c soc: amlogic: clk-measure: add axg and g12a support 2019-02-07 16:50:36 -08:00
meson-gx-pwrc-vpu.c soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off 2018-02-12 14:15:46 -08:00
meson-gx-socinfo.c meson-gx-socinfo: add missing of_node_put after of_device_is_available 2019-03-18 09:07:32 -07:00
meson-mx-socinfo.c meson-mx-socinfo: Make local function meson_mx_socinfo_init() static 2018-02-12 14:15:47 -08:00