Messages in this thread |  | | Date | Wed, 9 Apr 2025 11:37:39 +0800 | | From | Peng Fan <> | | Subject | Re: [PATCH v4 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol |
| |
On Tue, Apr 08, 2025 at 12:17:54PM +0300, Dan Carpenter wrote: >On Tue, Apr 08, 2025 at 04:44:27PM +0800, Peng Fan (OSS) wrote: >> +static int scmi_imx_lmm_protocol_attributes_get(const struct scmi_protocol_handle *ph, >> + struct scmi_imx_lmm_priv *priv) >> +{ >> + struct scmi_msg_imx_lmm_protocol_attributes *attr; >> + struct scmi_xfer *t; >> + int ret; >> + >> + ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, 0, >> + sizeof(*attr), &t); >> + if (ret) >> + return ret; >> + >> + attr = t->rx.buf; >> + >> + ret = ph->xops->do_xfer(ph, t); >> + if (!ret) { >> + priv->nr_lmm = le32_get_bits(attr->attributes, SCMI_IMX_LMM_NR_LM_MASK); >> + if (priv->nr_lmm > SCMI_IMX_LMM_NR_MAX) { >> + dev_err(ph->dev, "i.MX LMM: %d:Exceed max supported Logical Machines\n", >> + priv->nr_lmm); >> + return -EINVAL; > >This needs to call ph->xops->xfer_put(ph, t) before returning.
Oops. Thanks for spotting this.
I will wait to see if any more comments.
Not sure Sudeep could help address this if no more comments, or need me to send a new version.
Thanks, Peng.
> >> + } >> + dev_info(ph->dev, "i.MX LMM: %d Logical Machines\n", priv->nr_lmm); >> + } >> + >> + ph->xops->xfer_put(ph, t); >> + >> + return ret; >> +} > >regards, >dan carpenter
|  |