summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2015-05-02 09:55:53 +0200
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:12:56 +0100
commitc51023e65d3eaf953843a73d2ddb6a9d090aff11 (patch)
tree7ccc045ec8bd25fa0b3e46d2d7c929e4747c56e8 /drivers
parent71f600974dbafccb84443d52abd11b16da793b60 (diff)
downloadlinux-c51023e65d3eaf953843a73d2ddb6a9d090aff11.tar.gz
video: fbdev: bcm2708_fb: Don't panic on error
No need to panic the kernel if the video driver fails. Just print a message and return an error. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/bcm2708_fb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 917929105315..52e655acf25d 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -325,8 +325,8 @@ static int bcm2708_fb_set_par(struct fb_info *info)
/* the console may currently be locked */
console_trylock();
console_unlock();
-
- BUG(); /* what can we do here */
+ pr_err("bcm2708_fb_set_par: Failed to set screen_base\n");
+ return -EIO;
}
}
print_debug
@@ -677,7 +677,9 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb)
*/
fb_set_var(&fb->fb, &fb->fb.var);
- bcm2708_fb_set_par(&fb->fb);
+ ret = bcm2708_fb_set_par(&fb->fb);
+ if (ret)
+ return ret;
print_debug("BCM2708FB: registering framebuffer (%dx%d@%d) (%d)\n", fbwidth,
fbheight, fbdepth, fbswap);