Probe should fail with -ENODEV when called with NULL pdev->dev.of_node.
Signed-off-by: Ladislav Michl ladis@linux-mips.org --- sound/soc/atmel/atmel_wm8904.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index fbc10f61eb55..39a73c4d19ec 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -85,10 +85,8 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev) struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; int ret;
- if (!np) { - dev_err(&pdev->dev, "only device tree supported\n"); - return -EINVAL; - } + if (!np) + return -ENODEV;
ret = snd_soc_of_parse_card_name(card, "atmel,model"); if (ret) {