[<prev] [next>] [day] [month] [year] [list]
Message-id: <1380813020-12246-1-git-send-email-sangjung.woo@samsung.com>
Date: Fri, 04 Oct 2013 00:10:20 +0900
From: Sangjung Woo <sangjung.woo@...sung.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Robin Holt <holt@....com>
Cc: linux-kernel@...r.kernel.org,
Sangjung Woo <sangjung.woo@...sung.com>
Subject: [PATCH] sgi-xp: fix wrong usage of dev_set_name()
The second parameter of dev_set_name() is format string. In order to
avoid any potential accidents such as segmentation fault, basic format
parameter "%s" should be used in this case.
Signed-off-by: Sangjung Woo <sangjung.woo@...sung.com>
---
drivers/misc/sgi-xp/xpc_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index 82dc574..ed668ec 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -1233,8 +1233,8 @@ xpc_init(void)
int ret;
struct task_struct *kthread;
- dev_set_name(xpc_part, "part");
- dev_set_name(xpc_chan, "chan");
+ dev_set_name(xpc_part, "%s", "part");
+ dev_set_name(xpc_chan, "%s", "chan");
if (is_shub()) {
/*
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists