Commit 1c3d69ab authored by Dan Carpenter's avatar Dan Carpenter Committed by Michael S. Tsirkin

virtio-mem: silence a static checker warning

Smatch complains that "rc" can be uninitialized if we hit the "break;"
statement on the first iteration through the loop.  I suspect that this
can't happen in real life, but returning a zero literal is cleaner and
silence the static checker warning.

Fixes: 5f1f79bb ("virtio-mem: Paravirtualized memory hotplug")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200610085911.GC5439@mwandaSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent c09cc2c3
......@@ -1192,7 +1192,7 @@ static int virtio_mem_mb_plug_any_sb(struct virtio_mem *vm, unsigned long mb_id,
VIRTIO_MEM_MB_STATE_OFFLINE);
}
return rc;
return 0;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment