From: Chanwoo Choi <cw00.choi@samsung.com>
To: Maninder Singh <maninder1.s@samsung.com>, myungjoo.ham@samsung.com
Cc: linux-kernel@vger.kernel.org, pankaj.m@samsung.com,
Vaneet Narang <v.narang@samsung.com>
Subject: Re: [PATCH 1/1] extcon: fixing compile time warning
Date: Mon, 01 Aug 2016 18:38:02 +0900 [thread overview]
Message-ID: <579F187A.30401@samsung.com> (raw)
In-Reply-To: <1470043290-15486-1-git-send-email-maninder1.s@samsung.com>
On 2016년 08월 01일 18:21, Maninder Singh wrote:
> This patch fixes below compilation warning:-
> drivers/extcon/extcon.c: In function extcon_register_notifier:
> drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (idx >= 0) {
>
> Signed-off-by: Vaneet Narang <v.narang@samsung.com>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> ---
> drivers/extcon/extcon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 8682efc..24f04c4 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -428,7 +428,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
> struct notifier_block *nb)
> {
> unsigned long flags;
> - int ret, idx;
> + int ret, idx = -EINVAL;
>
> if (!nb)
> return -EINVAL;
>
Applied it.
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2016-08-01 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160801093306epcas1p2a3a02973b4bf532bf878bf0dabfffdea@epcas1p2.samsung.com>
2016-08-01 9:21 ` [PATCH 1/1] extcon: fixing compile time warning Maninder Singh
2016-08-01 9:38 ` Chanwoo Choi [this message]
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=579F187A.30401@samsung.com \
--to=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=myungjoo.ham@samsung.com \
--cc=pankaj.m@samsung.com \
--cc=v.narang@samsung.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