Messages in this thread | | | Date | Wed, 11 Feb 2004 22:57:24 +0000 | From | viro@parcelfa ... | Subject | Re: fbdev driver and sysfs question. |
| |
On Wed, Feb 11, 2004 at 10:26:45PM +0000, James Simmons wrote: > + info = framebuffer_alloc(0, &dev->dev); > + if (!info) > + return -ENOMEM; > + dev_set_drvdata(&dev->dev, info); > + > + info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len); > + if (!info->screen_base) { > release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len); > printk(KERN_ERR > "vesafb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n",
Who will free info?
> - fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); > + fb_alloc_cmap(&info->cmap, video_cmap_len, 0); > > - if (register_framebuffer(&fb_info)<0) > + if (register_framebuffer(info) < 0)
Who will undo allocations? BTW, that applies to the old code too - even if fb_alloc_cmap() doesn't require any actions on cleanup, ioremap() definitely does.
> return -EINVAL; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |