[PATCH] ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()

Cristian Ciocaltea posted 1 patch 9 months, 2 weeks ago
sound/soc/amd/acp/acp-sof-mach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()
Posted by Cristian Ciocaltea 9 months, 2 weeks ago
The 'card' pointer is not required to be NULL initialized as it is never
accessed before the related memory allocation takes place.

Drop the redundant assignment.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
 sound/soc/amd/acp/acp-sof-mach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c
index d7b54f12f4062481876f636e483c2922e2029a5f..6215e31eceddf8931ed55c29d8488629e23bcdd0 100644
--- a/sound/soc/amd/acp/acp-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sof-mach.c
@@ -88,7 +88,7 @@ static struct acp_card_drvdata sof_nau8821_max98388_data = {
 
 static int acp_sof_probe(struct platform_device *pdev)
 {
-	struct snd_soc_card *card = NULL;
+	struct snd_soc_card *card;
 	struct device *dev = &pdev->dev;
 	struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev);
 	const struct dmi_system_id *dmi_id;

---
base-commit: 9d9096722447b77662d4237a09909bde7774f22e
change-id: 20250429-acp-sof-probe-assign-b1676fe1009d
Re: [PATCH] ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()
Posted by Mark Brown 9 months, 1 week ago
On Tue, 29 Apr 2025 13:29:43 +0300, Cristian Ciocaltea wrote:
> The 'card' pointer is not required to be NULL initialized as it is never
> accessed before the related memory allocation takes place.
> 
> Drop the redundant assignment.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()
      commit: 85f380f2b9ab6e9a8753626fa3d8a3f4a323043a

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