]> xenbits.xensource.com Git - xen.git/commitdiff
gnttab: remove pointless NULL check
authorJan Beulich <jbeulich@suse.com>
Tue, 17 Apr 2012 13:05:05 +0000 (15:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Apr 2012 13:05:05 +0000 (15:05 +0200)
Domains in the domain hash (and hence locatable via the usual lookup
functions) can't have a NULL grant table pointer; no other function
performs such a check, so remove it from gnttab_prepare_for_transfer()
for consistency.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/common/grant_table.c

index 04c70388ca18b4ad0840503c699ed03f26f9a6cd..d248c8b2f04bde38631f6437377f78c153c75ed4 100644 (file)
@@ -1390,17 +1390,11 @@ static int
 gnttab_prepare_for_transfer(
     struct domain *rd, struct domain *ld, grant_ref_t ref)
 {
-    struct grant_table *rgt;
+    struct grant_table *rgt = rd->grant_table;
     grant_entry_header_t *sha;
     union grant_combo   scombo, prev_scombo, new_scombo;
     int                 retries = 0;
 
-    if ( unlikely((rgt = rd->grant_table) == NULL) )
-    {
-        gdprintk(XENLOG_INFO, "Dom %d has no grant table.\n", rd->domain_id);
-        return 0;
-    }
-
     spin_lock(&rgt->lock);
 
     if ( rgt->gt_version == 0 )