From: Tang Bin Date: Wed, 26 Aug 2020 15:09:18 +0000 (+0800) Subject: ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=601fd3a7d849cf8a5dbd3628b3c29af9e5377961;p=linux.git ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() 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 Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20200826150918.16116-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 455f96908377c..9c5607780590c 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -1259,9 +1259,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;