Patchwork [U-Boot,07/12] drivers/video/da8xx-fb.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 15, 2011, 11:20 p.m.
Message ID <1321399263-13826-8-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/125889/
State Accepted
Commit 6ed076cdda645f10a0c5a10e8193031278869479
Headers show

Comments

Anatolij Gustschin - Nov. 15, 2011, 11:20 p.m.
Fix:
da8xx-fb.c: In function 'video_hw_init':
da8xx-fb.c:688:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/video/da8xx-fb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 16, 2011, 8:36 p.m.
Dear Anatolij Gustschin,

In message <1321399263-13826-8-git-send-email-agust@denx.de> you wrote:
> Fix:
> da8xx-fb.c: In function 'video_hw_init':
> da8xx-fb.c:688:6: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/video/da8xx-fb.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index bca9fb5..a2981b1 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -685,7 +685,6 @@  static u32 wait_for_event(u32 event)
 void *video_hw_init(void)
 {
 	struct da8xx_fb_par *par;
-	int ret;
 	u32 size;
 	char *p;
 
@@ -738,7 +737,6 @@  void *video_hw_init(void)
 
 	if (lcd_init(par, &lcd_cfg, lcd_panel) < 0) {
 		printf("lcd_init failed\n");
-		ret = -EFAULT;
 		goto err_release_fb;
 	}
 
@@ -754,7 +752,6 @@  void *video_hw_init(void)
 		(unsigned int)par->vram_virt);
 	if (!par->vram_virt) {
 		printf("GLCD: malloc for frame buffer failed\n");
-		ret = -EINVAL;
 		goto err_release_fb;
 	}