[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM3j68p0i-AeuKX9CfU99pbmtj9PT_GOom+nzCZWdAMmGm8XMQ@mail.gmail.com>
Date: Thu, 29 Nov 2012 17:33:24 +0100
From: Cong Ding <dinggnu@...il.com>
To: Vitalii Demianets <vitas@...factor.kiev.ua>
Cc: "Hans J. Koch" <hjk@...sjkoch.de>, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] uio.c: Fix warning: 'ret' might be used uninitialized
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@...factor.kiev.ua> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists