Re: [PATCH v2 1/5] ASoC: codecs: lpass-rx-macro: Simplify with cleanup.h

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

 



On 28/06/2024 12:10, Krzysztof Kozlowski wrote:
> Allocate the default register values array with scoped/cleanup.h to
> reduce number of error paths and make code a bit simpler.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> 
> ---
> 
> Not adding Dmitry's Rb tag, because of major change devm->cleanup.h.
> ---
>  sound/soc/codecs/lpass-rx-macro.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
> index d47c49c90de3..4cf030760d74 100644
> --- a/sound/soc/codecs/lpass-rx-macro.c
> +++ b/sound/soc/codecs/lpass-rx-macro.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  // Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
>  
> +#include <linux/cleanup.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/io.h>
> @@ -3764,7 +3765,6 @@ static const struct snd_soc_component_driver rx_macro_component_drv = {
>  
>  static int rx_macro_probe(struct platform_device *pdev)
>  {
> -	struct reg_default *reg_defaults;
>  	struct device *dev = &pdev->dev;
>  	kernel_ulong_t flags;
>  	struct rx_macro *rx;
> @@ -3809,6 +3809,8 @@ static int rx_macro_probe(struct platform_device *pdev)
>  		goto err;

I got now LKP report about build warning on clang (which I did not build
with).

note: jump bypasses initialization of variable with __attribute__((cleanup))

This needs new version.

Best regards,
Krzysztof




[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