Re: [PATCH] uio.c: Fix warning: 'ret' might be used uninitialized

From: Cong Ding
Date: Thu Nov 29 2012 - 11:33:16 EST


No, there are some exceptions. Imagine this case, when mi=0,
everything works correct in the loop, and then mi=1, if the kzalloc in
line 286 fails, you patch will goto err_map with ret=-ENOMEM, while
Hans's patch will goto err_map with ret=0 (the ret=0 is from line 295
when mi=0).

On Thu, Nov 29, 2012 at 5:22 PM, Vitalii Demianets
<vitas@xxxxxxxxxxxxxxxxx> wrote:
> Actually, both patches do exactly the same thing. Hans's patch establishes
> default value for the ret for all those "other" cases when ret is not
> explicitly overridden. My patch explicitly enumerates all those "other" cases
> in more wordily manner.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/