[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444017557-27296-1-git-send-email-dmitry.kalinkin@gmail.com>
Date: Mon, 5 Oct 2015 06:59:17 +0300
From: Dmitry Kalinkin <dmitry.kalinkin@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Martyn Welch <martyn@...chs.me.uk>,
Manohar Vanga <manohar.vanga@...il.com>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Dmitry Kalinkin <dmitry.kalinkin@...il.com>
Subject: [PATCH] vme: tsi148: silence uninitialized variable warning
The warning is a false positive.
drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_write':
drivers/vme/bridges/vme_tsi148.c:1358:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
vme_unregister_error_handler(handler);
^
drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_read':
drivers/vme/bridges/vme_tsi148.c:1260:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
vme_unregister_error_handler(handler);
^
Fixes: 0b0496625715 ("vme: change bus error handling scheme")
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@...il.com>
---
drivers/vme/bridges/vme_tsi148.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c
index d1e383b..6052483 100644
--- a/drivers/vme/bridges/vme_tsi148.c
+++ b/drivers/vme/bridges/vme_tsi148.c
@@ -1186,7 +1186,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf,
int retval, enabled;
unsigned long long vme_base, size;
u32 aspace, cycle, dwidth;
- struct vme_error_handler *handler;
+ struct vme_error_handler *handler = NULL;
struct vme_bridge *tsi148_bridge;
void __iomem *addr = image->kern_base + offset;
unsigned int done = 0;
@@ -1276,7 +1276,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf,
unsigned int done = 0;
unsigned int count32;
- struct vme_error_handler *handler;
+ struct vme_error_handler *handler = NULL;
struct vme_bridge *tsi148_bridge;
struct tsi148_driver *bridge;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists