On Tue, Aug 28, 2018 at 02:35:04PM +0100, Charles Keepax wrote: > Currently DAPM has almost identical code to handle errors from > snd_soc_dapm_new_control_unlocked in many places. Centralise > this handling within snd_soc_dapm_new_control_unlocked and > remove the duplicated error reporting. This also has the fringe > benefit of removing a lot of error messages that would have > been printed on the -ENOMEM paths. This changelog doesn't entirely match up with the change: > } > - if (!data->widget) { > - ret = -ENOMEM; > - goto err_data; > - } > } and > w = snd_soc_dapm_new_control_unlocked(dapm, widget); > - /* Do not nag about probe deferrals */ > - if (IS_ERR(w)) { > - int ret = PTR_ERR(w); > - > - if (ret != -EPROBE_DEFER) > - dev_err(dapm->dev, > - "ASoC: Failed to create DAPM control %s (%d)\n", > - widget->name, ret); > - goto out_unlock; > - } > - if (!w) > - dev_err(dapm->dev, > - "ASoC: Failed to create DAPM control %s\n", > - widget->name); > - > -out_unlock: > mutex_unlock(&dapm->card->dapm_mutex); > + > return w; are not obviously identical.
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel