mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Vinod Koul <vinod.koul@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] regmap: fix return of uninitialized value
Date: Sat, 1 Jun 2013 19:52:04 +0100	[thread overview]
Message-ID: <20130601185204.GF16790@sirena.org.uk> (raw)
In-Reply-To: <1369931042-9755-2-git-send-email-vinod.koul@intel.com>

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-06-01 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 16:24 [PATCH 1/2] regmap: give users _choice_ to allow write access to debugfs Vinod Koul
2013-05-30 16:24 ` [PATCH 2/2] regmap: fix return of uninitialized value Vinod Koul
2013-06-01 18:52   ` Mark Brown [this message]
2013-06-01 18:49 ` [PATCH 1/2] regmap: give users _choice_ to allow write access to debugfs Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130601185204.GF16790@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®