Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: sisusbvga: Remove unneeded variable

Remove unneeded variable ret in function sisusb_set_default_mode.

Change return type of sisusb_set_default_mode from int to void
as it never fails.

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
-----
changes in v2: Change return type of sisusb_set_default_mode from int to
void as it never fails

changes in v3: Update changelog
----

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hariprasad Kelam and committed by
Greg Kroah-Hartman
a3fe2605 4c06a42e

+4 -6
+4 -6
drivers/usb/misc/sisusbvga/sisusb.c
··· 1747 1747 return ret; 1748 1748 } 1749 1749 1750 - static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, 1750 + static void sisusb_set_default_mode(struct sisusb_usb_data *sisusb, 1751 1751 int touchengines) 1752 1752 { 1753 - int ret = 0, i, j, modex, bpp, du; 1753 + int i, j, modex, bpp, du; 1754 1754 u8 sr31, cr63, tmp8; 1755 1755 static const char attrdata[] = { 1756 1756 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, ··· 1873 1873 } 1874 1874 1875 1875 SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ 1876 - 1877 - return ret; 1878 1876 } 1879 1877 1880 1878 static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) ··· 2017 2019 2018 2020 ret |= SETIREG(SISCR, 0x83, 0x00); 2019 2021 2020 - ret |= sisusb_set_default_mode(sisusb, 0); 2022 + sisusb_set_default_mode(sisusb, 0); 2021 2023 2022 2024 ret |= SETIREGAND(SISSR, 0x21, 0xdf); 2023 2025 ret |= SETIREGOR(SISSR, 0x01, 0x20); ··· 2244 2246 if (sisusb_init_gfxcore(sisusb) == 0) { 2245 2247 sisusb->gfxinit = 1; 2246 2248 sisusb_get_ramconfig(sisusb); 2247 - ret |= sisusb_set_default_mode(sisusb, 1); 2249 + sisusb_set_default_mode(sisusb, 1); 2248 2250 ret |= sisusb_setup_screen(sisusb, 1, initscreen); 2249 2251 } 2250 2252 }