From 66c7acf61dc6b27954bb9ceb8617d447ac03734a Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 7 Jan 2009 14:29:18 +0100 Subject: i2c: Use snprintf to set adapter names Use snprintf instead of sprintf to set adapter names, it's safer. Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/i2c/busses/i2c-at91.c') diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 9efb02137254..67d9dc5b351b 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -222,7 +222,7 @@ static int __devinit at91_i2c_probe(struct platform_device *pdev) rc = -ENOMEM; goto fail2; } - sprintf(adapter->name, "AT91"); + snprintf(adapter->name, sizeof(adapter->name), "AT91"); adapter->algo = &at91_algorithm; adapter->class = I2C_CLASS_HWMON; adapter->dev.parent = &pdev->dev; -- cgit v1.2.3