mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
i2c-stu300: make sure adapter-name is terminated
Use strlcpy instead of strncpy. Signed-off-by: Wolfram Sang <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
This commit is contained in:
parent
d8204a37ba
commit
f10820e495
1 changed files with 1 additions and 1 deletions
|
|
@ -942,7 +942,7 @@ stu300_probe(struct platform_device *pdev)
|
|||
adap->owner = THIS_MODULE;
|
||||
/* DDC class but actually often used for more generic I2C */
|
||||
adap->class = I2C_CLASS_DDC;
|
||||
strncpy(adap->name, "ST Microelectronics DDC I2C adapter",
|
||||
strlcpy(adap->name, "ST Microelectronics DDC I2C adapter",
|
||||
sizeof(adap->name));
|
||||
adap->nr = bus_nr;
|
||||
adap->algo = &stu300_algo;
|
||||
|
|
|
|||
Loading…
Reference in a new issue