Re: [patch V2 09/10] scsi: ufs: qcom: Remove the MSI descriptor abuse

Dan Carpenter
2025-03-28T10:00:17Z

On Thu, Mar 13, 2025 at 02:03:51PM +0100, Thomas Gleixner wrote:
> @@ -1799,8 +1803,7 @@ static irqreturn_t ufs_qcom_mcq_esi_hand
> static int ufs_qcom_config_esi(struct ufs_hba *hba)
> {
> struct ufs_qcom_host *host = ufshcd_get_variant(hba);
> - struct msi_desc *desc;
> - struct msi_desc *failed_desc = NULL;
> + struct ufs_qcom_irq *qi;
> int nr_irqs, ret;
>
> if (host->esi_enabled)
> @@ -1811,47 +1814,47 @@ static int ufs_qcom_config_esi(struct uf
> * 2. Poll queues do not need ESI.
> */
> nr_irqs = hba->nr_hw_queues - hba->nr_queues[HCTX_TYPE_POLL];
> + qi = devm_kcalloc(hba->dev, nr_irqs, sizeof(*qi), GFP_KERNEL);
> + if (qi)

This NULL check is reversed. Missing !.

regards,
dan carpenter

> + return -ENOMEM;
> +
> ret = platform_device_msi_init_and_alloc_irqs(hba->dev, nr_irqs,
> ufs_qcom_write_msi_msg);