From: Chris Metcalf <cmetcalf@tilera.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: <kernel-janitors@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Paul Mundt <lethal@linux-sh.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
<linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] char: hvc: check for error case
Date: Mon, 13 Sep 2010 09:12:53 -0400 [thread overview]
Message-ID: <4C8E2355.60807@tilera.com> (raw)
In-Reply-To: <1284317835-5086-1-git-send-email-segooon@gmail.com>
On 9/12/2010 2:57 PM, Vasiliy Kulikov wrote:
> hvc_alloc() may fail, if so exit from init() with error.
>
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Thanks, accepted into my tree (for the next merge window). In practice all
this means is in debug mode we'll get a warning from do_one_initcall()
rather than silence, but you're right, it's technically better. :-)
> ---
> I cannot compile this driver at all, so it is not tested.
>
> drivers/char/hvc_tile.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/hvc_tile.c b/drivers/char/hvc_tile.c
> index c4efb55..7a84a05 100644
> --- a/drivers/char/hvc_tile.c
> +++ b/drivers/char/hvc_tile.c
> @@ -61,7 +61,8 @@ console_initcall(hvc_tile_console_init);
>
> static int __init hvc_tile_init(void)
> {
> - hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
> - return 0;
> + struct hvc_struct *s;
> + s = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
> + return IS_ERR(s) ? PTR_ERR(s) : 0;
> }
> device_initcall(hvc_tile_init);
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
next prev parent reply other threads:[~2010-09-13 13:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 18:57 [PATCH] char: hvc: check for error case Vasiliy Kulikov
2010-09-13 13:12 ` Chris Metcalf [this message]
2010-09-13 13:32 ` Vasiliy Kulikov
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=4C8E2355.60807@tilera.com \
--to=cmetcalf@tilera.com \
--cc=arnd@arndb.de \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=kernel-janitors@vger.kernel.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=segooon@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