device assignment: move memset to after mmap failure check
commitc502514e96f5e1bd8d73d3dd61e3f32df9e0ea06
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 26 Apr 2009 11:46:38 +0000 (26 14:46 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 26 Apr 2009 11:52:04 +0000 (26 14:52 +0300)
tree501ca22acadf791d7e5581f4eda1245571f4f5ec
parentc4896c177b183be8d04ccca2ed871303c3d684d7
device assignment: move memset to after mmap failure check

By the time we've done a memset, it's too late to
check the pointer for MAP_FAILED value. Let's compare
to MAP_FAILED first.

Signed-off-by: Michael S. Tsikirn <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/device-assignment.c