From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH -next] iommu/amd: fix error return code in early_amd_iommu_init() Date: Tue, 23 Apr 2013 14:38:40 +0200 Message-ID: <20130423123839.GB2589@8bytes.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Wei Yongjun Cc: yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Tue, Apr 23, 2013 at 10:47:44AM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > 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 > --- > 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.