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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -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_id = be32_to_cpup(iprop);

How do you think about to adjust the exception handling in this function
implementation a bit more according to the Linux coding style?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/sound/soc/fsl/fsl_utils.c?id=c705247136a523488eac806bd357c3e5d79a7acd#n16

Regards,
Markus
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux