[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <579F187A.30401@samsung.com>
Date: Mon, 01 Aug 2016 18:38:02 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: Maninder Singh <maninder1.s@...sung.com>, myungjoo.ham@...sung.com
Cc: linux-kernel@...r.kernel.org, pankaj.m@...sung.com,
Vaneet Narang <v.narang@...sung.com>
Subject: Re: [PATCH 1/1] extcon: fixing compile time warning
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@...sung.com>
> Signed-off-by: Maninder Singh <maninder1.s@...sung.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
Powered by blists - more mailing lists