diff options
author | Ville Syrjala <syrjala@sci.fi> | 2008-07-24 00:31:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:39 -0400 |
commit | 89c69d2b8eb3ee2338fded9d70a0795b4712f112 (patch) | |
tree | 1d9fbb17751f236eaf5d463aa9ca5fa5fe928e13 /drivers/video/aty | |
parent | 6cfafc15994ac2a2377b32b5a65cf62a90a80d49 (diff) |
atyfb: report probe errors
Properly propagate errors to the probe function.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 872760accb93..e38398f491f0 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2231,6 +2231,7 @@ static int __devinit aty_init(struct fb_info *info) | |||
2231 | const char *ramname = NULL, *xtal; | 2231 | const char *ramname = NULL, *xtal; |
2232 | int gtb_memsize, has_var = 0; | 2232 | int gtb_memsize, has_var = 0; |
2233 | struct fb_var_screeninfo var; | 2233 | struct fb_var_screeninfo var; |
2234 | int ret; | ||
2234 | 2235 | ||
2235 | init_waitqueue_head(&par->vblank.wait); | 2236 | init_waitqueue_head(&par->vblank.wait); |
2236 | spin_lock_init(&par->int_lock); | 2237 | spin_lock_init(&par->int_lock); |
@@ -2612,7 +2613,8 @@ static int __devinit aty_init(struct fb_info *info) | |||
2612 | var.yres_virtual = var.yres; | 2613 | var.yres_virtual = var.yres; |
2613 | } | 2614 | } |
2614 | 2615 | ||
2615 | if (atyfb_check_var(&var, info)) { | 2616 | ret = atyfb_check_var(&var, info); |
2617 | if (ret) { | ||
2616 | PRINTKE("can't set default video mode\n"); | 2618 | PRINTKE("can't set default video mode\n"); |
2617 | goto aty_init_exit; | 2619 | goto aty_init_exit; |
2618 | } | 2620 | } |
@@ -2623,10 +2625,12 @@ static int __devinit aty_init(struct fb_info *info) | |||
2623 | #endif /* CONFIG_FB_ATY_CT */ | 2625 | #endif /* CONFIG_FB_ATY_CT */ |
2624 | info->var = var; | 2626 | info->var = var; |
2625 | 2627 | ||
2626 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) | 2628 | ret = fb_alloc_cmap(&info->cmap, 256, 0); |
2629 | if (ret < 0) | ||
2627 | goto aty_init_exit; | 2630 | goto aty_init_exit; |
2628 | 2631 | ||
2629 | if (register_framebuffer(info) < 0) { | 2632 | ret = register_framebuffer(info); |
2633 | if (ret < 0) { | ||
2630 | fb_dealloc_cmap(&info->cmap); | 2634 | fb_dealloc_cmap(&info->cmap); |
2631 | goto aty_init_exit; | 2635 | goto aty_init_exit; |
2632 | } | 2636 | } |
@@ -2652,7 +2656,7 @@ aty_init_exit: | |||
2652 | par->mtrr_aper = -1; | 2656 | par->mtrr_aper = -1; |
2653 | } | 2657 | } |
2654 | #endif | 2658 | #endif |
2655 | return -1; | 2659 | return ret; |
2656 | } | 2660 | } |
2657 | 2661 | ||
2658 | static void aty_resume_chip(struct fb_info *info) | 2662 | static void aty_resume_chip(struct fb_info *info) |
@@ -3467,7 +3471,8 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi | |||
3467 | pci_set_drvdata(pdev, info); | 3471 | pci_set_drvdata(pdev, info); |
3468 | 3472 | ||
3469 | /* Init chip & register framebuffer */ | 3473 | /* Init chip & register framebuffer */ |
3470 | if (aty_init(info)) | 3474 | rc = aty_init(info); |
3475 | if (rc) | ||
3471 | goto err_release_io; | 3476 | goto err_release_io; |
3472 | 3477 | ||
3473 | #ifdef __sparc__ | 3478 | #ifdef __sparc__ |