i2c: Use snprintf to set adapter names
Use snprintf instead of sprintf to set adapter names, it's safer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user