diff options
Diffstat (limited to 'drivers/video/ffb.c')
-rw-r--r-- | drivers/video/ffb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 2a0e8210d398..949141bd44d4 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
@@ -968,6 +968,8 @@ static int ffb_init_one(struct of_device *op) | |||
968 | 968 | ||
969 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 969 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
970 | printk(KERN_ERR "ffb: Could not allocate color map.\n"); | 970 | printk(KERN_ERR "ffb: Could not allocate color map.\n"); |
971 | of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); | ||
972 | of_iounmap(all->par.dac, sizeof(struct ffb_dac)); | ||
971 | kfree(all); | 973 | kfree(all); |
972 | return -ENOMEM; | 974 | return -ENOMEM; |
973 | } | 975 | } |
@@ -978,6 +980,8 @@ static int ffb_init_one(struct of_device *op) | |||
978 | if (err < 0) { | 980 | if (err < 0) { |
979 | printk(KERN_ERR "ffb: Could not register framebuffer.\n"); | 981 | printk(KERN_ERR "ffb: Could not register framebuffer.\n"); |
980 | fb_dealloc_cmap(&all->info.cmap); | 982 | fb_dealloc_cmap(&all->info.cmap); |
983 | of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); | ||
984 | of_iounmap(all->par.dac, sizeof(struct ffb_dac)); | ||
981 | kfree(all); | 985 | kfree(all); |
982 | return err; | 986 | return err; |
983 | } | 987 | } |