Prev: make task_struct->signal immutable/refcountable
Next: keyctl_session_to_parent: use thread_group_empty() to check singlethreadness
From: Jonathan Corbet on 9 Apr 2010 15:40 On Thu, 08 Apr 2010 20:22:57 +0200 Florian Tobias Schandinat <FlorianSchandinat(a)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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |