aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/omap-keypad.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-04-15 01:31:33 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-15 01:31:33 -0400
commitda3e4c885e5ebbccc8181f53d8ae74c4c22d506f (patch)
tree3e66f53b367b8cc2bd0f4a7f271dd16aee25e6ab /drivers/input/keyboard/omap-keypad.c
parent1164ec1ae43770db6ea5450c6cac0761b11d6d1d (diff)
Input: omap-keypad - fix build warning
Fix the following build warning: drivers/input/keyboard/omap-keypad.c: In function 'omap_kp_probe': drivers/input/keyboard/omap-keypad.c:418: warning: 'row_idx' is used uninitialized in this function drivers/input/keyboard/omap-keypad.c:421: warning: 'col_idx' is used uninitialized in this function These variables are useful when cpu_is_omap24xx(), and otherwise just for useless cleanup. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/omap-keypad.c')
-rw-r--r--drivers/input/keyboard/omap-keypad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index babc913d5492..eec328167f8d 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -352,6 +352,9 @@ static int __init omap_kp_probe(struct platform_device *pdev)
352 } 352 }
353 omap_set_gpio_direction(row_gpios[row_idx], 1); 353 omap_set_gpio_direction(row_gpios[row_idx], 1);
354 } 354 }
355 } else {
356 col_idx = 0;
357 row_idx = 0;
355 } 358 }
356 359
357 setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp); 360 setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
@@ -415,10 +418,10 @@ err4:
415err3: 418err3:
416 device_remove_file(&pdev->dev, &dev_attr_enable); 419 device_remove_file(&pdev->dev, &dev_attr_enable);
417err2: 420err2:
418 for (i = row_idx-1; i >=0; i--) 421 for (i = row_idx - 1; i >=0; i--)
419 omap_free_gpio(row_gpios[i]); 422 omap_free_gpio(row_gpios[i]);
420err1: 423err1:
421 for (i = col_idx-1; i >=0; i--) 424 for (i = col_idx - 1; i >=0; i--)
422 omap_free_gpio(col_gpios[i]); 425 omap_free_gpio(col_gpios[i]);
423 426
424 kfree(omap_kp); 427 kfree(omap_kp);