]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Uninitialized variables in sysfs files
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Jul 2017 08:34:23 +0000 (11:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 11:19:19 +0000 (13:19 +0200)
commit21b92bccd665f593667e6e34c8a86cebcfecd76c
tree8b0b3a1c891e7496f470cdfcdb53acc46c051d8f
parentef1953feb7bb07119c106077c8cbf19cdc902d69
serial: sh-sci: Uninitialized variables in sysfs files

The kstrtol() function returns -ERANGE as well as -EINVAL so these tests
are not enough.  It's not a super serious bug, but my static checker
correctly complains that the "r" variable might be used uninitialized.

Fixes: eb9386089d81 ("serial: sh-sci: make RX FIFO parameters tunable via sysfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c