lkml.org 
[lkml]   [2013]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] regmap: fix return of uninitialized value
On Thu, May 30, 2013 at 09:54:02PM +0530, Vinod Koul wrote:

> struct regmap_debugfs_off_cache *c = NULL;
> loff_t p = 0;
> - unsigned int i, ret;
> + unsigned int i, ret = 0;

Two problems here. One is that we shouldn't mix initialised and
non-initialised declarations on one line and the other is that just
squashing a value in isn't a great fix for this sort of thing - it's
just shutting the warning up but perhaps the compiler has actually
spotted some control flow error and there's more wrong than just a
missing initialisation.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-06-01 21:21    [W:0.073 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site