Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698365

[PATCH v2 0/3] ASoC: fix unbalanced of_node_get()/of_node_put()

From Antonio Borneo <borneo.antonio@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 0/3] ASoC: fix unbalanced of_node_get()/of_node_put()
Date 2017-07-28 01:40 +0200
Message-ID <u80oa-4c2-9@gated-at.bofh.it> (permalink)
References <u7g1Z-8nQ-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Antonio Borneo <borneo.antonio@gmail.com>

On Hikey target board, enabling CONFIG_OF_DYNAMIC triggers several
errors at kernel boot, like
OF: ERROR: Bad of_node_put() on /soc/i2s@f7118000/ports/port@0
OF: ERROR: Bad of_node_put() on /soc/i2s@f7118000/ports/port@0/endpoint
each followed by stack dump.

Fixed by:
- removing of_node_put() in the body of of_for_each_phandle(){},
  since already provided at each iteration. Add it in case the
  loop is break out;
- adding of_node_get() before calling of_graph_get_port_parent().

Tested with kernel v4.13-rc2 with hikey_defconfig taken from
https://git.linaro.org/people/john.stultz/android-dev.git
branch dev/hikey-mainline-WIP

v1 -> v2:
- modify subject "s/fix balance of/fix unbalanced/";
- split the patch per each individual issue. It also simplify the
  backport;
- add ref to the commit being fixed;
- drop one fix not needed.

Antonio Borneo (3):
  ASoC: fix use of of_node_put() in of_for_each_phandle() loops
  ASoC: soc-core: fix unbalanced of_node_get()/of_node_put()
  ASoC: simple-card-utils: fix unbalanced of_node_get()/of_node_put()

 sound/soc/generic/audio-graph-card.c  | 9 ++++-----
 sound/soc/generic/simple-card-utils.c | 5 +++++
 sound/soc/soc-core.c                  | 5 +++++
 3 files changed, 14 insertions(+), 5 deletions(-)

-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ASoC: fix balance of of_node_get()/of_node_put() Antonio Borneo <borneo.antonio@gmail.com> - 2017-07-26 00:00 +0200
  Re: [PATCH] ASoC: fix balance of of_node_get()/of_node_put() Mark Brown <broonie@kernel.org> - 2017-07-26 13:40 +0200
    Re: [PATCH] ASoC: fix balance of of_node_get()/of_node_put() Antonio Borneo <borneo.antonio@gmail.com> - 2017-07-28 01:30 +0200
  [PATCH v2 0/3] ASoC: fix unbalanced of_node_get()/of_node_put() Antonio Borneo <borneo.antonio@gmail.com> - 2017-07-28 01:40 +0200
    Re: [PATCH v2 0/3] ASoC: fix unbalanced of_node_get()/of_node_put() Mark Brown <broonie@kernel.org> - 2017-07-28 12:10 +0200
      Re: [PATCH v2 0/3] ASoC: fix unbalanced of_node_get()/of_node_put() Antonio Borneo <borneo.antonio@gmail.com> - 2017-07-30 22:40 +0200

csiph-web