public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: debugfs: Fix compiler warning
@ 2013-02-02 22:53 Stratos Karafotis
  2013-02-04 10:42 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Stratos Karafotis @ 2013-02-02 22:53 UTC (permalink / raw)
  To: Mark Brown, Greg Kroah-Hartman; +Cc: linux-kernel

This patch fixes the following compiler warning of uninitialized
variable:

drivers/base/regmap/regmap-debugfs.c: In function ‘regmap_read_debugfs’:
drivers/base/regmap/regmap-debugfs.c:180:9: warning: ‘ret’ may be used
uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
 drivers/base/regmap/regmap-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index d9a6c94..aa570af 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -80,7 +80,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
 {
        struct regmap_debugfs_off_cache *c = NULL;
        loff_t p = 0;
-       unsigned int i, ret;
+       unsigned int i, ret = base;

        /*
         * If we don't have a cache build one so we don't have to do a
-- 
1.8.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-04 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-02 22:53 [PATCH] regmap: debugfs: Fix compiler warning Stratos Karafotis
2013-02-04 10:42 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox