Re: 2.6.23-rc3-mm1 - irda goes belly up
From: Eric W. Biederman
Date: Thu Aug 23 2007 - 23:50:04 EST
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/