All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty/tty_io.c: fix compilation warning
@ 2011-01-14  7:18 Viresh Kumar
  2011-01-14  9:07 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2011-01-14  7:18 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: Viresh Kumar

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;
 }
 
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-14 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14  7:18 [PATCH] tty/tty_io.c: fix compilation warning Viresh Kumar
2011-01-14  9:07 ` Jiri Slaby
2011-01-14 19:04   ` Greg KH

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.