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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to