[PATCH 11/11] lib: utils/mpxy: Use domain notifier for deferred creation of MPXY RPMI
Rahul Pathak
rahul.pathak at oss.qualcomm.com
Thu Oct 8 09:13:07 PDT 2026
> +
> +static int __mpxy_rpmi_defer_notif(struct sbi_domain *dom,
> + enum sbi_domain_notify_event event,
> + void *priv)
> +{
> + struct __mpxy_rpmi_defer_init_priv *ipriv = priv;
> + int rc;
> +
> + /* Do nothing if domain name does not match */
> + if (sbi_strcmp(dom->name, ipriv->dom_name))
> + return 0;
> +
> + /* Unregister notifier */
> + rc = sbi_domain_unregister_notifier(__mpxy_rpmi_defer_notif,
> + SBI_DOMAIN_NOTIFY_EVENT_REGISTER, ipriv);
> + if (rc)
> + return rc;
> +
> + /* Create MPXY RPMI instance */
> + rc = __mpxy_rpmi_init(ipriv->data, ipriv->chan, ipriv->mpxy_channel_id, dom);
> + if (rc)
> + return rc;
> +
> + sbi_free(ipriv);
Freeing the ipriv is only required for success path, what about error cases?
> + return 0;
> +}
> +
More information about the opensbi
mailing list