From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: __clk_set_parent: set uninitialized variable
Date: Sun, 1 Jul 2012 23:18:59 +0200 [thread overview]
Message-ID: <1341177539-27716-1-git-send-email-mkl@pengutronix.de> (raw)
This patch fixes the following warning:
drivers/clk/clk.c: In function '__clk_set_parent':
drivers/clk/clk.c:1083:5: warning: 'i' may be used uninitialized in this function [-Wuninitialized]
which has been introduced with commit:
commit 7975059db572eb47f0fb272a62afeae272a4b209
Author: Rajendra Nayak <rnayak@ti.com>
Date: Wed Jun 6 14:41:31 2012 +0530
clk: Allow late cache allocation for clk->parents
This patch applies to linux-3.5-rc5
Cc: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
Hello,
please check if this is the correct fix. The original patch has been
schedules for stable, this fix may be a candicate, too.
regards, Marc
drivers/clk/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index dcbe056..60d1bb4 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1063,7 +1063,7 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent)
struct clk *old_parent;
unsigned long flags;
int ret = -EINVAL;
- u8 i;
+ u8 i = 0;
old_parent = clk->parent;
--
1.7.10
next reply other threads:[~2012-07-01 21:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-01 21:18 Marc Kleine-Budde [this message]
2012-07-02 5:57 ` [PATCH] clk: __clk_set_parent: set uninitialized variable Rajendra Nayak
2012-07-02 6:47 ` Uwe Kleine-König
2012-07-02 7:24 ` Rajendra Nayak
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=1341177539-27716-1-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).