aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/virtio/virtio_mmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index e9fdeb861992..c600ccfd6922 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -471,7 +471,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
471 471
472 /* Check magic value */ 472 /* Check magic value */
473 magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE); 473 magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE);
474 if (memcmp(&magic, "virt", 4) != 0) { 474 if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
475 dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic); 475 dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic);
476 return -ENODEV; 476 return -ENODEV;
477 } 477 }