diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index e0948c922988..1f13e2a1f322 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -129,6 +129,7 @@ static inline void __init zoom2_init_quaduart(void) | |||
129 | static inline int omap_zoom2_debugboard_detect(void) | 129 | static inline int omap_zoom2_debugboard_detect(void) |
130 | { | 130 | { |
131 | int debug_board_detect = 0; | 131 | int debug_board_detect = 0; |
132 | int ret = 1; | ||
132 | 133 | ||
133 | debug_board_detect = ZOOM2_SMSC911X_GPIO; | 134 | debug_board_detect = ZOOM2_SMSC911X_GPIO; |
134 | 135 | ||
@@ -140,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void) | |||
140 | gpio_direction_input(debug_board_detect); | 141 | gpio_direction_input(debug_board_detect); |
141 | 142 | ||
142 | if (!gpio_get_value(debug_board_detect)) { | 143 | if (!gpio_get_value(debug_board_detect)) { |
143 | gpio_free(debug_board_detect); | 144 | ret = 0; |
144 | return 0; | ||
145 | } | 145 | } |
146 | return 1; | 146 | gpio_free(debug_board_detect); |
147 | return ret; | ||
147 | } | 148 | } |
148 | 149 | ||
149 | static struct platform_device *zoom2_devices[] __initdata = { | 150 | static struct platform_device *zoom2_devices[] __initdata = { |