From: Jiri Slaby <jirislaby@gmail.com>
To: Viresh Kumar <viresh.kumar@st.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
Kay Sievers <kay.sievers@suse.de>
Subject: Re: [PATCH] tty/tty_io.c: fix compilation warning
Date: Fri, 14 Jan 2011 10:07:05 +0100 [thread overview]
Message-ID: <4D301239.5030303@gmail.com> (raw)
In-Reply-To: <1294989497-2531-1-git-send-email-viresh.kumar@st.com>
On 01/14/2011 08:18 AM, Viresh Kumar wrote:
> This patch fixes following compilation warning:
> tty/tty_io.c:3309: warning: ignoring return value of 'device_create_file',
> declared with attribute warn_unused_result
>
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
> drivers/tty/tty_io.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index 464d09d..b558f03 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -3291,6 +3291,8 @@ void console_sysfs_notify(void)
> */
> int __init tty_init(void)
> {
> + int ret = 0;
> +
> cdev_init(&tty_cdev, &tty_fops);
> if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
> register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
> @@ -3306,11 +3308,11 @@ int __init tty_init(void)
> if (IS_ERR(consdev))
> consdev = NULL;
> else
> - device_create_file(consdev, &dev_attr_active);
> + ret = device_create_file(consdev, &dev_attr_active);
>
> #ifdef CONFIG_VT
> vty_init(&console_fops);
> #endif
> - return 0;
> + return ret;
NACK
There is no failpath handling. And I think Kay has a patch for that
already where he ignores the retval.
regards,
--
js
next prev parent reply other threads:[~2011-01-14 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 7:18 [PATCH] tty/tty_io.c: fix compilation warning Viresh Kumar
2011-01-14 9:07 ` Jiri Slaby [this message]
2011-01-14 19:04 ` Greg KH
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=4D301239.5030303@gmail.com \
--to=jirislaby@gmail.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@st.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