aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/grant_table.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-04-17 15:05:05 +0200
committerJan Beulich <jbeulich@suse.com>2012-04-17 15:05:05 +0200
commit55fb80266efe5583fe34ac62a93cee55bd30a44b (patch)
treeaa28825415e1de08e9e9eb6e5baf81379070208c /xen/common/grant_table.c
parent8eee0a1a5f73085467e4a5e8ada94a3d9599cb4d (diff)
downloadxen-55fb80266efe5583fe34ac62a93cee55bd30a44b.tar.gz
xen-55fb80266efe5583fe34ac62a93cee55bd30a44b.tar.bz2
xen-55fb80266efe5583fe34ac62a93cee55bd30a44b.zip
gnttab: remove pointless NULL check
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>
Diffstat (limited to 'xen/common/grant_table.c')
-rw-r--r--xen/common/grant_table.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 04c70388ca..d248c8b2f0 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -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 )