Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vc4: fix infinite EPROBE_DEFER loop

`vc4_hdmi_audio_init` calls `devm_snd_dmaengine_pcm_register` which may
return EPROBE_DEFER. Calling `drm_connector_hdmi_audio_init` adds a
child device. The driver model docs[1] state that adding a child device
prior to returning EPROBE_DEFER may result in an infinite loop.

[1] https://www.kernel.org/doc/html/v6.14/driver-api/driver-model/driver.html

Fixes: 9640f1437a88 ("drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure")
Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
Link: https://lore.kernel.org/r/20250601-vc4-audio-inf-probe-v2-1-9ad43c7b6147@gmail.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Gabriel Dalimonte and committed by
Maxime Ripard
c0317ad4 779a0c9e

+6 -6
+6 -6
drivers/gpu/drm/vc4/vc4_hdmi.c
··· 560 560 if (ret) 561 561 return ret; 562 562 563 - ret = drm_connector_hdmi_audio_init(connector, dev->dev, 564 - &vc4_hdmi_audio_funcs, 565 - 8, false, -1); 566 - if (ret) 567 - return ret; 568 - 569 563 drm_connector_helper_add(connector, &vc4_hdmi_connector_helper_funcs); 570 564 571 565 /* ··· 2284 2290 dev_err(dev, "Could not register CPU DAI: %d\n", ret); 2285 2291 return ret; 2286 2292 } 2293 + 2294 + ret = drm_connector_hdmi_audio_init(&vc4_hdmi->connector, dev, 2295 + &vc4_hdmi_audio_funcs, 8, false, 2296 + -1); 2297 + if (ret) 2298 + return ret; 2287 2299 2288 2300 dai_link->cpus = &vc4_hdmi->audio.cpu; 2289 2301 dai_link->codecs = &vc4_hdmi->audio.codec;