* [PATCH -next] iommu/amd: fix error return code in early_amd_iommu_init()
@ 2013-04-23 2:47 Wei Yongjun
2013-04-23 12:38 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-04-23 2:47 UTC (permalink / raw)
To: joro; +Cc: yongjun_wei, iommu, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return -ENOMEM int the memory alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/iommu/amd_iommu_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 9110c1c..a55ec50 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -1860,6 +1860,7 @@ static int __init early_amd_iommu_init(void)
* Interrupt remapping enabled, create kmem_cache for the
* remapping tables.
*/
+ ret = -ENOMEM;
amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache",
MAX_IRQS_PER_TABLE * sizeof(u32),
IRQ_TABLE_ALIGNMENT,
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH -next] iommu/amd: fix error return code in early_amd_iommu_init()
2013-04-23 2:47 [PATCH -next] iommu/amd: fix error return code in early_amd_iommu_init() Wei Yongjun
@ 2013-04-23 12:38 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2013-04-23 12:38 UTC (permalink / raw)
To: Wei Yongjun; +Cc: yongjun_wei, iommu, linux-kernel
On Tue, Apr 23, 2013 at 10:47:44AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -ENOMEM int the memory alloc error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/iommu/amd_iommu_init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
> index 9110c1c..a55ec50 100644
> --- a/drivers/iommu/amd_iommu_init.c
> +++ b/drivers/iommu/amd_iommu_init.c
> @@ -1860,6 +1860,7 @@ static int __init early_amd_iommu_init(void)
> * Interrupt remapping enabled, create kmem_cache for the
> * remapping tables.
> */
> + ret = -ENOMEM;
> amd_iommu_irq_cache = kmem_cache_create("irq_remap_cache",
> MAX_IRQS_PER_TABLE * sizeof(u32),
> IRQ_TABLE_ALIGNMENT,
>
Applied to x86/amd, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-23 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 2:47 [PATCH -next] iommu/amd: fix error return code in early_amd_iommu_init() Wei Yongjun
2013-04-23 12:38 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox