All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	heiko@sntech.de, alsa-devel@alsa-project.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: Applied "ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'" to the asoc tree
Date: Fri, 16 Jun 2017 06:57:30 +0200	[thread overview]
Message-ID: <e92fef8d-5ce1-0b7d-d130-0246d2cb7f91@wanadoo.fr> (raw)
In-Reply-To: <E1dLYRz-0001l4-SZ@debutante>

Le 15/06/2017 à 19:20, Mark Brown a écrit :
> The patch
>
>     ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> has been applied to the asoc tree at
>
>     git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>
>  From c3a3d3c41b74b05267bab6173f2a8224a1443ba6 Mon Sep 17 00:00:00 2001
> From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
> Date: Thu, 15 Jun 2017 07:53:11 +0200
> Subject: [PATCH] ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> If this memory allocation fail, we must disable what has been enabled.
> Do not return immediately but go thrue the error handling path instead.
>
> Also use 'devm_kmemdup' instead of 'devm_kzalloc+memcpy' to simplify code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   sound/soc/rockchip/rockchip_i2s.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
> index 66a26c56c658..ce09dee2202e 100644
> --- a/sound/soc/rockchip/rockchip_i2s.c
> +++ b/sound/soc/rockchip/rockchip_i2s.c
> @@ -641,12 +641,13 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
>   			goto err_pm_disable;
>   	}
>   
> -	soc_dai = devm_kzalloc(&pdev->dev,
> +	soc_dai = devm_kmemdup(&pdev->dev, &rockchip_i2s_dai
>   			       sizeof(*soc_dai), GFP_KERNEL);
> -	if (!soc_dai)
> -		return -ENOMEM;
> +	if (!soc_dai) {
> +		err = -ENOMEM;
> +		goto err_pm_disable;
> +	}
>   
> -	memcpy(soc_dai, &rockchip_i2s_dai, sizeof(*soc_dai));
>   	if (!of_property_read_u32(node, "rockchip,playback-channels", &val)) {
>   		if (val >= 2 && val <= 8)
>   			soc_dai->playback.channels_max = val;

... and 'err' should be 'ret'...

I'm really confused for such a ugly proposal !

CJ

WARNING: multiple messages have this Message-ID (diff)
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	heiko@sntech.de, alsa-devel@alsa-project.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: Applied "ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'" to the asoc tree
Date: Fri, 16 Jun 2017 04:57:30 +0000	[thread overview]
Message-ID: <e92fef8d-5ce1-0b7d-d130-0246d2cb7f91@wanadoo.fr> (raw)
In-Reply-To: <E1dLYRz-0001l4-SZ@debutante>

Le 15/06/2017 à 19:20, Mark Brown a écrit :
> The patch
>
>     ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> has been applied to the asoc tree at
>
>     git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>
>  From c3a3d3c41b74b05267bab6173f2a8224a1443ba6 Mon Sep 17 00:00:00 2001
> From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
> Date: Thu, 15 Jun 2017 07:53:11 +0200
> Subject: [PATCH] ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> If this memory allocation fail, we must disable what has been enabled.
> Do not return immediately but go thrue the error handling path instead.
>
> Also use 'devm_kmemdup' instead of 'devm_kzalloc+memcpy' to simplify code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   sound/soc/rockchip/rockchip_i2s.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
> index 66a26c56c658..ce09dee2202e 100644
> --- a/sound/soc/rockchip/rockchip_i2s.c
> +++ b/sound/soc/rockchip/rockchip_i2s.c
> @@ -641,12 +641,13 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
>   			goto err_pm_disable;
>   	}
>   
> -	soc_dai = devm_kzalloc(&pdev->dev,
> +	soc_dai = devm_kmemdup(&pdev->dev, &rockchip_i2s_dai
>   			       sizeof(*soc_dai), GFP_KERNEL);
> -	if (!soc_dai)
> -		return -ENOMEM;
> +	if (!soc_dai) {
> +		err = -ENOMEM;
> +		goto err_pm_disable;
> +	}
>   
> -	memcpy(soc_dai, &rockchip_i2s_dai, sizeof(*soc_dai));
>   	if (!of_property_read_u32(node, "rockchip,playback-channels", &val)) {
>   		if (val >= 2 && val <= 8)
>   			soc_dai->playback.channels_max = val;

... and 'err' should be 'ret'...

I'm really confused for such a ugly proposal !

CJ

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: christophe.jaillet@wanadoo.fr (Christophe JAILLET)
To: linux-arm-kernel@lists.infradead.org
Subject: Applied "ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'" to the asoc tree
Date: Fri, 16 Jun 2017 06:57:30 +0200	[thread overview]
Message-ID: <e92fef8d-5ce1-0b7d-d130-0246d2cb7f91@wanadoo.fr> (raw)
In-Reply-To: <E1dLYRz-0001l4-SZ@debutante>

Le 15/06/2017 ? 19:20, Mark Brown a ?crit :
> The patch
>
>     ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> has been applied to the asoc tree at
>
>     git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>
>  From c3a3d3c41b74b05267bab6173f2a8224a1443ba6 Mon Sep 17 00:00:00 2001
> From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
> Date: Thu, 15 Jun 2017 07:53:11 +0200
> Subject: [PATCH] ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'
>
> If this memory allocation fail, we must disable what has been enabled.
> Do not return immediately but go thrue the error handling path instead.
>
> Also use 'devm_kmemdup' instead of 'devm_kzalloc+memcpy' to simplify code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   sound/soc/rockchip/rockchip_i2s.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
> index 66a26c56c658..ce09dee2202e 100644
> --- a/sound/soc/rockchip/rockchip_i2s.c
> +++ b/sound/soc/rockchip/rockchip_i2s.c
> @@ -641,12 +641,13 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
>   			goto err_pm_disable;
>   	}
>   
> -	soc_dai = devm_kzalloc(&pdev->dev,
> +	soc_dai = devm_kmemdup(&pdev->dev, &rockchip_i2s_dai
>   			       sizeof(*soc_dai), GFP_KERNEL);
> -	if (!soc_dai)
> -		return -ENOMEM;
> +	if (!soc_dai) {
> +		err = -ENOMEM;
> +		goto err_pm_disable;
> +	}
>   
> -	memcpy(soc_dai, &rockchip_i2s_dai, sizeof(*soc_dai));
>   	if (!of_property_read_u32(node, "rockchip,playback-channels", &val)) {
>   		if (val >= 2 && val <= 8)
>   			soc_dai->playback.channels_max = val;

... and 'err' should be 'ret'...

I'm really confused for such a ugly proposal !

CJ

  parent reply	other threads:[~2017-06-16  4:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15  5:53 [PATCH] ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe' Christophe JAILLET
2017-06-15  5:53 ` Christophe JAILLET
2017-06-15  5:53 ` Christophe JAILLET
2017-06-15 11:38 ` kbuild test robot
2017-06-15 11:38   ` kbuild test robot
2017-06-15 11:38   ` kbuild test robot
2017-06-15 11:38   ` kbuild test robot
2017-06-15 17:20 ` Applied "ASoC: rockchip: Fix an error handling in 'rockchip_i2s_probe'" to the asoc tree Mark Brown
2017-06-15 17:20   ` Mark Brown
2017-06-15 17:20   ` Mark Brown
2017-06-15 17:20   ` Mark Brown
2017-06-15 17:20   ` Mark Brown
2017-06-15 17:32   ` Christophe JAILLET
2017-06-15 17:32     ` Christophe JAILLET
2017-06-15 17:32     ` Christophe JAILLET
2017-06-15 19:12     ` Mark Brown
2017-06-15 19:12       ` Mark Brown
2017-06-15 19:12       ` Mark Brown
2017-06-15 19:12       ` Mark Brown
2017-06-16  4:57   ` Christophe JAILLET [this message]
2017-06-16  4:57     ` Christophe JAILLET
2017-06-16  4:57     ` Christophe JAILLET
2017-06-16  9:18     ` Mark Brown
2017-06-16  9:18       ` Mark Brown
2017-06-16  9:18       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e92fef8d-5ce1-0b7d-d130-0246d2cb7f91@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.