Andrew Morton <[email protected]> writes:
>
> Yes, the ENOMEM is bogus. But irda_sysctl_register() saw a NULL return
> from register_sysctl_table() and simply has no clue why it failed, and is
> forced to assume ENOMEM. That's a design shortcoming in
> register_sysctl_table(), whcih should have returned an ERR_PTR. Doesn't
> matter much.
I should say something about the return value issue.
Currently the only time this matters is when someone messes up in
development, and if it isn't an out of memory error we get messages in
dmesg so it shouldn't be to hard to sort out.
I agree it is a bit of a short coming that we can only return NULL
and it might be worth changing that at some point. Perhaps when
I introduce register_sysctl_path would be a good time. Going
through all of the callers just to give a better return value when
they can't do anything about it anyway seems to be a lot of work
for a very minor improvement.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]