lkml.org 
[lkml]   [2013]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] regmap: Fix compile warning with value uninitialized
On Sat, Nov 09, 2013 at 09:49:11AM +0000, Caizhiyong wrote:

> @@ -2170,7 +2170,8 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
> int num_regs)
> {
> struct reg_default *p;
> - int i, ret;
> + int i;
> + int ret = 0;
> bool bypass;

This sort of fix isn't ideal, it just silences the warning but if the
compiler has spotted a genuine oversight in the function it won't
address it. It's better to include some analysis of why this is a good
fix.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-11-09 16:41    [W:0.043 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site