Re: [PATCH] ASoC: samsung: odroid: Use common code in odroid_audio_probe()

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

 



On Thu, 18 Jul 2019 at 11:57, Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Thu, 18 Jul 2019 11:42:29 +0200
>
> Replace a function call and a return statement by a goto statement so that
> a bit of common code will be reused at the end of this function.
>
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  sound/soc/samsung/odroid.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c
> index f0f5fa9c27d3..d152ef8dfea3 100644
> --- a/sound/soc/samsung/odroid.c
> +++ b/sound/soc/samsung/odroid.c
> @@ -316,8 +316,7 @@ static int odroid_audio_probe(struct platform_device *pdev)
>         }
>
>         of_node_put(cpu_dai);
> -       of_node_put(codec);
> -       return 0;
> +       goto err_put_node;

No, it does not look good. It makes the code and flow more difficult to follow.

Best regards,
Krzysztof



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux