linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe()
@ 2020-08-26 15:09 Tang Bin
  2020-08-26 16:53 ` Mark Brown
  2020-10-01 22:46 ` [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Tang Bin @ 2020-08-26 15:09 UTC (permalink / raw)
  To: broonie, timur, lgirdwood, perex, tiwai
  Cc: alsa-devel, linuxppc-dev, linux-kernel, Tang Bin, Zhang Shengju

The function fsl_spdif_probe() is only called with an openfirmware
platform device. Therefore there is no need to check that the passed
in device is NULL.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 sound/soc/fsl/fsl_spdif.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 7858a5499..395c50167 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1221,9 +1221,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 	void __iomem *regs;
 	int irq, ret, i;
 
-	if (!np)
-		return -ENODEV;
-
 	spdif_priv = devm_kzalloc(&pdev->dev, sizeof(*spdif_priv), GFP_KERNEL);
 	if (!spdif_priv)
 		return -ENOMEM;
-- 
2.20.1.windows.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-01 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 15:09 [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() Tang Bin
2020-08-26 16:53 ` Mark Brown
2020-08-27  1:37   ` [PATCH] ASoC: fsl_spdif: Fix unnecessary check infsl_spdif_probe() Tang Bin
2020-10-01 22:46 ` [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).