[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-fbdev-devel
Subject: Re: [Linux-fbdev-devel] [PATCH 01/16] [FB] viafb: Fix various
From: Jonathan Corbet <corbet () lwn ! net>
Date: 2010-04-09 19:31:39
Message-ID: 20100409133139.1ab17828 () bike ! lwn ! net
[Download RAW message or body]
On Thu, 08 Apr 2010 20:22:57 +0200
Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
> > if (!viafbinfo->screen_base) {
> > printk(KERN_INFO "ioremap failed\n");
> > - return -ENOMEM;
> > + rc = -EIO;
>
> I don't know whether this is right (changing the return code) as Andrew
> recommend a while ago:
> "It should return -ENOMEM rather than -1, but that's minor."
> So I did and now I wonder which one is correct?
To me it seems like -ENOMEM could be a bit confusing here; there's a lot of
things that could go wrong with that same error return.
That said, I did some digging around, and -ENOMEM does seem to be the
standard response to an ioremap() failure. So I've changed it back.
> > if (!viafbinfo1) {
> > printk(KERN_ERR
> > "allocate the second framebuffer struct error\n");
> > - framebuffer_release(viafbinfo);
> > - return -ENOMEM;
>
> rc = -ENOMEM;
> is missing?
Indeed. Fixed.
Thanks,
jon
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic