diff options
author | Olof Johansson <olof@lixom.net> | 2019-05-16 07:51:48 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2019-05-16 07:51:48 +0200 |
commit | 7a0c4c17089a8aff52f516f0f52002be52950aae (patch) | |
tree | 474dc451d62a1ba788ed52c4cecf93f9e50cc39a /sound/core/info.c | |
parent | Merge tag 'v5.2-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
parent | Merge tag 'davinci-fixes-for-v5.1' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-7a0c4c17089a8aff52f516f0f52002be52950aae.tar.xz linux-7a0c4c17089a8aff52f516f0f52002be52950aae.zip |
Merge branch 'fixes' into arm/soc
Merge in a few pending fixes from pre-5.1 that didn't get sent in:
MAINTAINERS: update arch/arm/mach-davinci
ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect
ARM: dts: imx6q-logicpd: Reduce inrush current on USBH1
ARM: dts: imx6q-logicpd: Reduce inrush current on start
ARM: dts: imx: Fix the AR803X phy-mode
ARM: dts: sun8i: a33: Reintroduce default pinctrl muxing
arm64: dts: allwinner: a64: Rename hpvcc-supply to cpvdd-supply
ARM: sunxi: fix a leaked reference by adding missing of_node_put
ARM: sunxi: fix a leaked reference by adding missing of_node_put
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 96a074019c33..0eb169acc850 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -713,8 +713,11 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent, INIT_LIST_HEAD(&entry->list); entry->parent = parent; entry->module = module; - if (parent) + if (parent) { + mutex_lock(&parent->access); list_add_tail(&entry->list, &parent->children); + mutex_unlock(&parent->access); + } return entry; } @@ -792,7 +795,12 @@ void snd_info_free_entry(struct snd_info_entry * entry) list_for_each_entry_safe(p, n, &entry->children, list) snd_info_free_entry(p); - list_del(&entry->list); + p = entry->parent; + if (p) { + mutex_lock(&p->access); + list_del(&entry->list); + mutex_unlock(&p->access); + } kfree(entry->name); if (entry->private_free) entry->private_free(entry); |