RE: [patch 06/20] genirq/msi: Check for invalid MSI parent domain usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Sent: Friday, November 11, 2022 9:57 PM
> 
> @@ -937,13 +937,21 @@ int msi_domain_alloc_irqs_descs_locked(s
> 
>  	lockdep_assert_held(&dev->msi.data->mutex);
> 
> +	if (WARN_ON_ONCE(irq_domain_is_msi_parent(domain))) {
> +		ret = -EINVAL;
> +		goto free;
> +	}
> +
> +	/* Frees allocated descriptors in case of failure. */
>  	ret = msi_domain_add_simple_msi_descs(info, dev, nvec);
>  	if (ret)
>  		return ret;

it's unusual to see a direct return when error unwind is already required
at an early failure point. is it something which can be improved here?




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux