[Intel-gfx] [PATCH 3/3] ALSA: hda: Make audio component support more generic

Takashi Iwai tiwai at suse.de
Mon Jul 16 20:33:05 UTC 2018


On Mon, 16 Jul 2018 15:48:15 +0200,
Takashi Iwai wrote:
> 
> +static int hdac_component_master_bind(struct device *dev)
> +{
> +	struct drm_audio_component *acomp = hdac_get_acomp(dev);
> +	int ret;
> +
> +	ret = component_bind_all(dev, acomp);
> +	if (ret < 0)
> +		return ret;
> +
> +	if (WARN_ON(!(acomp->dev && acomp->ops))) {
> +		ret = -EINVAL;
> +		goto out_unbind;
> +	}
> +
> +	/* pin the module to avoid dynamic unbinding, but only if given */
> +	if (!try_module_get(acomp->ops->owner)) {
> +		ret = -ENODEV;
> +		goto out_unbind;
> +	}
> +
> +	if (acomp->audio_ops->master_bind) {

Here misses the NULL check of acomp->audio_ops, which is caught by the
intel CI.  I overlooked it since the upcoming patch will set audio_ops
initially for i915 as well.  Will fix it in v2.


thanks,

Takashi


More information about the Intel-gfx mailing list