Skip to contentSkip to conversation

video: da8xx-fb: fix fb_probe error path

PATCH New Axel Lin 4 participants 5 messages Jan 20, 2011 – Jan 25, 2011 Framebuffer layer

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 video: da8xx-fb: fix fb_probe error path

Current implementation puts CONFIG_CPU_FREQ at wrong place, CONFIG_CPU_FREQ is for lcd_da8xx_cpufreq_deregister not for unregister_framebuffer.

---
 drivers/video/da8xx-fb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/video/da8xx-fb.c +2 -1
index c265aed..520047a 100644
@@ -1092,9 +1092,10 @@ static int __init fb_probe(struct platform_device *device)
 
 irq_freq:
 #ifdef CONFIG_CPU_FREQ
+	lcd_da8xx_cpufreq_deregister(par);
+#endif
 err_cpu_freq:
 	unregister_framebuffer(da8xx_fb_info);
-#endif
 
 err_dealloc_cmap:
 	fb_dealloc_cmap(&da8xx_fb_info->cmap);
Signature · 1 line
1.7.2
author
#1 lore raw

PATCH 1/1 video: pxa168fb: remove a redundant pxa168fb_check_var call

Current implementation calls pxa168fb_check_var twice in pxa168fb_probe.

---
 drivers/video/pxa168fb.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/video/pxa168fb.c +1 -5
index cea6403..35f61dd 100644
@@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
 	 */
 	pxa168fb_init_mode(info, mi);
 
-	ret = pxa168fb_check_var(&info->var, info);
-	if (ret)
-		goto failed_free_fbmem;
-
 	/*
 	 * Fill in sane defaults.
 	 */
 	ret = pxa168fb_check_var(&info->var, info);
 	if (ret)
-		goto failed;
+		goto failed_free_fbmem;
 
 	/*
 	 * enable controller clock
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [PATCH] video: pxa168fb: remove a redundant pxa168fb_check_var call

Quoted 19 lines · On Friday 21 January 2011 12:18:06 Axel Lin wrote:

Current implementation calls pxa168fb_check_var twice in pxa168fb_probe.

---
 drivers/video/pxa168fb.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/video/pxa168fb.c +0 -0
index cea6403..35f61dd 100644
@@ -701,16 +701,12 @@ static int __devinit pxa168fb_probe(struct

platform_device *pdev) */

drivers/video/pxa168fb.c +0 -4
 	pxa168fb_init_mode(info, mi);
 
-	ret = pxa168fb_check_var(&info->var, info);
-	if (ret)
-		goto failed_free_fbmem;
-

drivers/video/pxa168fb.c static int __devinit pxa168fb_probe(struct platform_device *pdev) · line 712

Quoted 10 lines
drivers/video/pxa168fb.c +1 -1
 	/*
 	 * Fill in sane defaults.
 	 */
 	ret = pxa168fb_check_var(&info->var, info);
 	if (ret)
-		goto failed;
+		goto failed_free_fbmem;
 
 	/*
 	 * enable controller clock

Please, don't use the get_maintainers script. This CCs too many people, really. As for pxa168, only CC linux-arm-kernel, Eric, Haojian and that's about it (fixed). Thanks

I can't comment on the code, though Haojian, is there any particular reason why the call's twice in there? Maybe some HW quirk or something?

Cheers

#3 lore raw

Re: [PATCH] video: pxa168fb: remove a redundant pxa168fb_check_var call

Quoted 1 line · Marek Vasut

Please, don't use the get_maintainers script. This CCs too many people, really.

*Using* get_maintainers.pl is fine, but it is important to apply taste to the results since as you say it does generate false positives.

#4 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

Current implementation puts CONFIG_CPU_FREQ at wrong place, CONFIG_CPU_FREQ is for lcd_da8xx_cpufreq_deregister not for unregister_framebuffer.

Quoted 1 line · Axel Lin

Current implementation calls pxa168fb_check_var twice in pxa168fb_probe.

Both applied, thanks.