summaryrefslogtreecommitdiff
path: root/drivers/xen/gntalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/gntalloc.c')
-rw-r--r--drivers/xen/gntalloc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c
index 55acb32842a3..a15729beb9d1 100644
--- a/drivers/xen/gntalloc.c
+++ b/drivers/xen/gntalloc.c
@@ -175,8 +175,6 @@ undo:
static void __del_gref(struct gntalloc_gref *gref)
{
- unsigned long addr;
-
if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
uint8_t *tmp = kmap_local_page(gref->page);
tmp[gref->notify.pgoff] = 0;
@@ -190,10 +188,9 @@ static void __del_gref(struct gntalloc_gref *gref)
gref->notify.flags = 0;
if (gref->gref_id) {
- if (gref->page) {
- addr = (unsigned long)page_to_virt(gref->page);
- gnttab_end_foreign_access(gref->gref_id, addr);
- } else
+ if (gref->page)
+ gnttab_end_foreign_access(gref->gref_id, gref->page);
+ else
gnttab_free_grant_reference(gref->gref_id);
}