From: David Miller <davem@davemloft.net>
To: lyxmoo@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] AS apple talk protocol register_snap_client failed
Date: Fri, 14 Dec 2007 11:23:56 -0800 (PST) [thread overview]
Message-ID: <20071214.112356.16892769.davem@davemloft.net> (raw)
In-Reply-To: <ae65fe130712132203u6d77cf3h9d0265bb37da9574@mail.gmail.com>
From: "guanxun mu" <lyxmoo@gmail.com>
Date: Fri, 14 Dec 2007 14:03:05 +0800
> [PACTH APPLETALK]
>
> This patch update proto_init process when register_snap_client failed
>
> Signed-off-by: Michale Moore <lyxmoo@gmail.com>
>
> diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
> index 6c5c6dc..d6573f6 100644
> --- a/net/appletalk/aarp.c
> +++ b/net/appletalk/aarp.c
> @@ -873,7 +873,10 @@ void __init aarp_proto_init(void)
> {
> aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv);
> if (!aarp_dl)
> - printk(KERN_CRIT "Unable to register AARP with SNAP.\n");
> + {
> + printk(KERN_CRIT "Unable to register AARP with SNAP.\n");
> + return;
> + }
> init_timer(&aarp_timer);
> aarp_timer.function = aarp_expire_timeout;
> aarp_timer.data = 0;
Wrong coding style, the openning brace should be on the same line
as the if() check, see Documentation/CodingStyle Your email
client has also corrupted the tab characters into spaces, making
the patch unusable even if it were correct.
Next, if you are going to do this, you should modify aarp_proto_init()
to return error values, so that atalk_init() can see it and thus
undo the initialization it does and return an error for the module
load.
It is not useful to add error checks, without propagating them,
because an OOPS is just as good as a partially-initialized protocol
since that is likely to crash or malfunction as well.
The protocol is thus equally broken before and after your changes.
Please completely implement this fix, thank you.
prev parent reply other threads:[~2007-12-14 19:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 6:03 guanxun mu
2007-12-14 19:23 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214.112356.16892769.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lyxmoo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome