Skip to content
Commit 9cfbf7a6 authored by Alex Dewar's avatar Alex Dewar Committed by Greg Kroah-Hartman
Browse files

serial: core: don't use snprintf() for formatting sysfs attrs



As per the documentation (Documentation/filesystems/sysfs.rst),
snprintf() should not be used for formatting values returned by sysfs.

For all of the instances in serial_core.c, we know that the string will
be <PAGE_SIZE in length, so just use sprintf().

Issue identified by Coccinelle.

Signed-off-by: default avatarAlex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200824223932.27709-1-alex.dewar90@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c9fe14ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment