diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-08-03 11:21:10 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-09-12 04:57:04 -0400 |
commit | a032d33b65c89a781c871fd1def595fa6a69b52a (patch) | |
tree | 261f10d449f72e6b30f573217e806ff649057304 /arch/arm/mach-omap1 | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) |
ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
Resolve the following warnings from smatch:
arch/arm/mach-omap2/gpmc.c:282 gpmc_cs_set_timings() info: why not propagate 'div' from gpmc_cs_calc_divider() instead of -1?
arch/arm/mach-omap2/serial.c:328 omap_serial_init_port() error: 'pdev' dereferencing possible ERR_PTR()
arch/arm/mach-omap2/timer.c:213 omap2_gp_clockevent_init() Error invalid range 4096 to -1
arch/arm/mach-omap2/gpio.c:63 omap2_gpio_dev_init() warn: possible memory leak of 'pdata'
arch/arm/mach-omap2/omap_hwmod.c:1478 _assert_hardreset() warn: assigning -22 to unsigned variable 'ret'
arch/arm/mach-omap2/omap_hwmod.c:1487 _assert_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
arch/arm/mach-omap2/omap_hwmod.c:1545 _read_hardreset() warn: assigning -22 to unsigned variable 'ret'
arch/arm/mach-omap2/omap_hwmod.c:1554 _read_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
arch/arm/mach-omap2/dpll3xxx.c:629 omap3_clkoutx2_recalc() error: we previously assumed 'pclk' could be null (see line 627)
arch/arm/mach-omap2/board-n8x0.c:422 n8x0_mmc_late_init() Error invalid range 14 to 13
arch/arm/mach-omap1/leds-h2p2-debug.c:71 h2p2_dbg_leds_event() error: potentially derefencing uninitialized 'fpga'.
arch/arm/plat-omap/mux.c:79 omap_cfg_reg() Error invalid range 4096 to -1
Thanks to Tony Lindgren <tony@atomide.com> for pointing out that BUG()
can be disabled. The changes in the first version that removed the
subsequent return() after BUG() states have been dropped.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/leds-h2p2-debug.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index f6b14a14a957..78acaa9f4fd9 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c | |||
@@ -68,11 +68,13 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
68 | gpio_set_value(GPIO_IDLE, 0); | 68 | gpio_set_value(GPIO_IDLE, 0); |
69 | } | 69 | } |
70 | 70 | ||
71 | __raw_writew(~0, &fpga->leds); | ||
72 | led_state &= ~LED_STATE_ENABLED; | 71 | led_state &= ~LED_STATE_ENABLED; |
73 | if (evt == led_halted) { | 72 | if (fpga) { |
74 | iounmap(fpga); | 73 | __raw_writew(~0, &fpga->leds); |
75 | fpga = NULL; | 74 | if (evt == led_halted) { |
75 | iounmap(fpga); | ||
76 | fpga = NULL; | ||
77 | } | ||
76 | } | 78 | } |
77 | 79 | ||
78 | goto done; | 80 | goto done; |
@@ -158,7 +160,7 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
158 | /* | 160 | /* |
159 | * Actually burn the LEDs | 161 | * Actually burn the LEDs |
160 | */ | 162 | */ |
161 | if (led_state & LED_STATE_ENABLED) | 163 | if (led_state & LED_STATE_ENABLED && fpga) |
162 | __raw_writew(~hw_led_state, &fpga->leds); | 164 | __raw_writew(~hw_led_state, &fpga->leds); |
163 | 165 | ||
164 | done: | 166 | done: |