Re: [PATCH] video: Fix return value of fb_notifier_call_chain

From: Florian Tobias Schandinat
Date: Mon Nov 21 2011 - 18:08:35 EST


On 11/21/2011 06:55 AM, Joonyoung Shim wrote:
> The return value of blocking_notifier_call_chain isn't errno value, it
> is just notify return value. The ret of fb_notifier_call_chain should is
> restored to error value from notify return value using
> notifier_to_errno().

If I'm not wrong this patch would rather break things than fix them. As I
understand the notifier_calls would be required to encode the return value with
notifier_from_errno. This does not happen at the moment for fb clients, for
example fbcon_event_notify in drivers/video/console/fbcon.c, so this patch would
screw up the return values, I think.


Best regards,

Florian Tobias Schandinat

> Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
> ---
> drivers/video/fb_notify.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fb_notify.c b/drivers/video/fb_notify.c
> index 74c2da5..49a64a3 100644
> --- a/drivers/video/fb_notify.c
> +++ b/drivers/video/fb_notify.c
> @@ -42,6 +42,8 @@ EXPORT_SYMBOL(fb_unregister_client);
> */
> int fb_notifier_call_chain(unsigned long val, void *v)
> {
> - return blocking_notifier_call_chain(&fb_notifier_list, val, v);
> + int ret = blocking_notifier_call_chain(&fb_notifier_list, val, v);
> +
> + return notifier_to_errno(ret);
> }
> EXPORT_SYMBOL_GPL(fb_notifier_call_chain);

--
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/