From: Konrad Rzeszutek Wilk Subject: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw pointer. Date: Thu, 14 Jan 2010 18:00:56 -0500 Message-ID: <1263510064-16788-8-git-send-email-konrad.wilk@oracle.com> References: <1263510064-16788-1-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-2-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-3-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-4-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-5-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-6-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-7-git-send-email-konrad.wilk@oracle.com> Return-path: In-Reply-To: <1263510064-16788-7-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: fujita.tomonori@lab.ntt.co.jp, alex.williamson@hp.com, joerg.roedel@amd.com, dwmw2@infradead.org, chrisw@sous-sol.org, iommu@lists.linux-foundation.org Cc: Ian.Campbell@eu.citrix.com, jeremy@goop.org, xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org Previous to the usage of the iommu_sw pointer, we would check if io_tlb_overflow_buffer was set and use that to determine whether we had been called. With the iommu_sw introduction, we just need to check whether that pointer is not NULL. Signed-off-by: Konrad Rzeszutek Wilk --- lib/swiotlb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 3c7bd4e..72c9abe 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -364,7 +364,7 @@ cleanup1: void __init swiotlb_free(void) { - if (!iommu_sw->overflow_buffer) + if (!iommu_sw) return; if (late_alloc) { -- 1.6.2.5