diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-05-05 16:32:36 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-24 06:42:04 (GMT) |
commit | 69843ba7f24950f8ef5dadacfbfbd08f53e3455b (patch) | |
tree | 58e3974ed0660c789666cbb2132b1357eeb6dd0d /drivers/video/sh_mobile_lcdcfb.c | |
parent | 81df448eb02db14128875a6cff90876b39422a6d (diff) | |
download | linux-fsl-qoriq-69843ba7f24950f8ef5dadacfbfbd08f53e3455b.tar.xz |
fbdev: sh_mobile_lcdc: reduce scope of a variable
The "ret" variable in sh_mobile_lcdc_start() is only used at one
location, move its definition to the inner-most scope.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 9bcc61b..466834c 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -469,7 +469,6 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) int bpp = 0; unsigned long ldddsr; int k, m; - int ret = 0; /* enable clocks before accessing the hardware */ for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { @@ -538,11 +537,12 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) lcdc_write_chan(ch, LDPMR, 0); board_cfg = &ch->cfg.board_cfg; - if (board_cfg->setup_sys) - ret = board_cfg->setup_sys(board_cfg->board_data, ch, - &sh_mobile_lcdc_sys_bus_ops); - if (ret) - return ret; + if (board_cfg->setup_sys) { + int ret = board_cfg->setup_sys(board_cfg->board_data, + ch, &sh_mobile_lcdc_sys_bus_ops); + if (ret) + return ret; + } } /* word and long word swap */ |