From: Vasiliy Kulikov <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, Chris Metcalf <cmetcalf@tilera.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Paul Mundt <lethal@linux-sh.org>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] char: hvc: check for error case
Date: Sun, 12 Sep 2010 18:57:14 +0000 [thread overview]
Message-ID: <1284317835-5086-1-git-send-email-segooon@gmail.com> (raw)
hvc_alloc() may fail, if so exit from init() with error.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
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);
--
1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, Chris Metcalf <cmetcalf@tilera.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Paul Mundt <lethal@linux-sh.org>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] char: hvc: check for error case
Date: Sun, 12 Sep 2010 22:57:14 +0400 [thread overview]
Message-ID: <1284317835-5086-1-git-send-email-segooon@gmail.com> (raw)
hvc_alloc() may fail, if so exit from init() with error.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
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);
--
1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Chris Metcalf <cmetcalf@tilera.com>,
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: [PATCH] char: hvc: check for error case
Date: Sun, 12 Sep 2010 22:57:14 +0400 [thread overview]
Message-ID: <1284317835-5086-1-git-send-email-segooon@gmail.com> (raw)
hvc_alloc() may fail, if so exit from init() with error.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
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);
--
1.7.0.4
next reply other threads:[~2010-09-12 18:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 18:57 Vasiliy Kulikov [this message]
2010-09-12 18:57 ` [PATCH] char: hvc: check for error case Vasiliy Kulikov
2010-09-12 18:57 ` Vasiliy Kulikov
2010-09-13 13:12 ` Chris Metcalf
2010-09-13 13:12 ` Chris Metcalf
2010-09-13 13:12 ` Chris Metcalf
2010-09-13 13:32 ` Vasiliy Kulikov
2010-09-13 13:32 ` Vasiliy Kulikov
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=1284317835-5086-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=arnd@arndb.de \
--cc=cmetcalf@tilera.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.