Re: [PATCH] virtio-mem: silence a static checker warning

2020-06-10 Thread David Hildenbrand
> Am 10.06.2020 um 10:59 schrieb Dan Carpenter : > > 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 ch

Re: [PATCH] virtio-mem: silence a static checker warning

2020-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 11:59:11AM +0300, Dan Carpenter wrote: > 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 st

[PATCH] virtio-mem: silence a static checker warning

2020-06-10 Thread Dan Carpenter
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. Signed-off-by: Dan Carpenter --- drivers/virti