diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-11-26 11:13:07 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-26 15:22:56 +0300 |
commit | 83b12c2e1d942459f420490d4219fc1ad38c3620 (patch) | |
tree | 858eef248544cb2d5a7ddd35b5ac241b89bdac2e /sound/soc/amd | |
parent | 64ef0817b9679b525f86773e929777be96f5c728 (diff) | |
download | linux-83b12c2e1d942459f420490d4219fc1ad38c3620.tar.xz |
ASoC: amd: Fix a NULL vs IS_ERR() check in probe
The platform_device_register_full() function doesn't return NULL, it
returns error pointers.
Fixes: 7894a7e7ea3d ("ASoC: amd: create ACP3x PCM platform device")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd')
-rw-r--r-- | sound/soc/amd/raven/pci-acp3x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c index c28457fd9b81..facec2472b34 100644 --- a/sound/soc/amd/raven/pci-acp3x.c +++ b/sound/soc/amd/raven/pci-acp3x.c @@ -97,10 +97,10 @@ static int snd_acp3x_probe(struct pci_dev *pci, pdevinfo.size_data = sizeof(irqflags); adata->pdev = platform_device_register_full(&pdevinfo); - if (!adata->pdev) { + if (IS_ERR(adata->pdev)) { dev_err(&pci->dev, "cannot register %s device\n", pdevinfo.name); - ret = -ENODEV; + ret = PTR_ERR(adata->pdev); goto unmap_mmio; } break; |