All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging:iio: fix wrong usage of dev_set_name()
@ 2013-10-03 14:57 Sangjung Woo
  2013-10-03 16:13 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Sangjung Woo @ 2013-10-03 14:57 UTC (permalink / raw)
  To: Andrew Morton, Jonathan Cameron; +Cc: linux-iio, linux-kernel, Sangjung Woo

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@samsung.com>
---
 drivers/staging/iio/iio_dummy_evgen.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/iio_dummy_evgen.c b/drivers/staging/iio/iio_dummy_evgen.c
index 132d278..2c06d16 100644
--- a/drivers/staging/iio/iio_dummy_evgen.c
+++ b/drivers/staging/iio/iio_dummy_evgen.c
@@ -205,7 +205,7 @@ static __init int iio_dummy_evgen_init(void)
 	if (ret < 0)
 		return ret;
 	device_initialize(&iio_evgen_dev);
-	dev_set_name(&iio_evgen_dev, "iio_evgen");
+	dev_set_name(&iio_evgen_dev, "%s", "iio_evgen");
 	return device_add(&iio_evgen_dev);
 }
 module_init(iio_dummy_evgen_init);
-- 
1.7.9.5

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

end of thread, other threads:[~2013-10-03 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 14:57 [PATCH] staging:iio: fix wrong usage of dev_set_name() Sangjung Woo
2013-10-03 16:13 ` Lars-Peter Clausen

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.