Re: [PATCH 2/3] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-04-05 Thread Markus Elfring
> @@ -71,6 +71,7 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np, > iprop = of_get_property(dma_np, "cell-index", NULL); > if (!iprop) { > of_node_put(dma_np); > + of_node_put(dma_channel_np); > return -EINVAL; > } > *dma_i

[PATCH 2/3] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put

2019-02-26 Thread Wen Yang
The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incr