* [PATCH] atm: fore200e.c: fix uninitialized variable
@ 2013-01-14 18:57 Cong Ding
2013-01-14 23:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Cong Ding @ 2013-01-14 18:57 UTC (permalink / raw)
To: Chas Williams, linux-atm-general, netdev, linux-kernel; +Cc: Cong Ding
the variable err is uninitialized if all the macros in the function are
disabled.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
drivers/atm/fore200e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 204814e..d4725fc 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2780,7 +2780,7 @@ static struct pci_driver fore200e_pca_driver = {
static int __init fore200e_module_init(void)
{
- int err;
+ int err = 0;
printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] atm: fore200e.c: fix uninitialized variable
2013-01-14 18:57 [PATCH] atm: fore200e.c: fix uninitialized variable Cong Ding
@ 2013-01-14 23:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-14 23:30 UTC (permalink / raw)
To: dinggnu; +Cc: chas, linux-atm-general, netdev, linux-kernel
From: Cong Ding <dinggnu@gmail.com>
Date: Mon, 14 Jan 2013 18:57:43 +0000
> the variable err is uninitialized if all the macros in the function are
> disabled.
Which is never possible because of the Kconfig dependencies.
This is what happens when you focus to narrowly on a piece of
code, you take no context whatsoever into consideration.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-14 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 18:57 [PATCH] atm: fore200e.c: fix uninitialized variable Cong Ding
2013-01-14 23:30 ` David Miller
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).