Skip to content

Commit 1081094

Browse files
dwang26jnikula
authored andcommitted
drm/i915: Check num_pipes before initializing audio component
when num_pipes is zero, it indicates there is no display and HDMI audio doesn't exist. v2: Move the check from caller to callee for consistency. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Elaine Wang <elaine.wang@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1482142746-21663-1-git-send-email-elaine.wang@intel.com
1 parent 093d680 commit 1081094

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/i915/intel_audio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,9 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv)
928928
{
929929
int ret;
930930

931+
if (INTEL_INFO(dev_priv)->num_pipes == 0)
932+
return;
933+
931934
ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops);
932935
if (ret < 0) {
933936
DRM_ERROR("failed to add audio component (%d)\n", ret);

0 commit comments

Comments
 (0)