All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function
@ 2021-08-11 11:55 ` Tang Bin
  0 siblings, 0 replies; 10+ messages in thread
From: Tang Bin @ 2021-08-11 11:55 UTC (permalink / raw)
  To: broonie, olivier.moysan, arnaud.pouliquen, lgirdwood, perex, tiwai
  Cc: linux-stm32, linux-arm-kernel, linux-kernel, Tang Bin, Zhang Shengju

The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.

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

diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index 48145f553..8fe822903 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -908,13 +908,9 @@ static const struct of_device_id stm32_spdifrx_ids[] = {
 static int stm32_spdifrx_parse_of(struct platform_device *pdev,
 				  struct stm32_spdifrx_data *spdifrx)
 {
-	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_id;
 	struct resource *res;
 
-	if (!np)
-		return -ENODEV;
-
 	of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev);
 	if (of_id)
 		spdifrx->regmap_conf =
-- 
2.20.1.windows.1




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

end of thread, other threads:[~2021-08-11 12:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 11:55 [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function Tang Bin
2021-08-11 11:55 ` Tang Bin
2021-08-11 11:58 ` Mark Brown
2021-08-11 11:58   ` Mark Brown
2021-08-11 12:09   ` [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in theprobe function tangbin
2021-08-11 12:09     ` tangbin
2021-08-11 12:19     ` Mark Brown
2021-08-11 12:19       ` Mark Brown
2021-08-11 12:28       ` [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function tangbin
2021-08-11 12:28         ` tangbin

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.