diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-06-09 06:07:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-10 19:03:09 +0300 |
commit | a3fe2605a60d1d038e9a50cc3cd8a76bb48790b5 (patch) | |
tree | ac375e27780a80e096cede67755afbb55b1505c8 /drivers/usb/misc/sisusbvga | |
parent | 4c06a42e826d5bb24408c528aba2c13528225071 (diff) | |
download | linux-a3fe2605a60d1d038e9a50cc3cd8a76bb48790b5.tar.xz |
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>
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index ea06f1fed6fa..2ab9600d0898 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -1747,10 +1747,10 @@ static int sisusb_setup_screen(struct sisusb_usb_data *sisusb, return ret; } -static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, +static void sisusb_set_default_mode(struct sisusb_usb_data *sisusb, int touchengines) { - int ret = 0, i, j, modex, bpp, du; + int i, j, modex, bpp, du; u8 sr31, cr63, tmp8; static const char attrdata[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -1873,8 +1873,6 @@ static int sisusb_set_default_mode(struct sisusb_usb_data *sisusb, } SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ - - return ret; } static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) @@ -2019,7 +2017,7 @@ static int sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) ret |= SETIREG(SISCR, 0x83, 0x00); - ret |= sisusb_set_default_mode(sisusb, 0); + sisusb_set_default_mode(sisusb, 0); ret |= SETIREGAND(SISSR, 0x21, 0xdf); ret |= SETIREGOR(SISSR, 0x01, 0x20); @@ -2246,7 +2244,7 @@ static int sisusb_init_gfxdevice(struct sisusb_usb_data *sisusb, int initscreen) if (sisusb_init_gfxcore(sisusb) == 0) { sisusb->gfxinit = 1; sisusb_get_ramconfig(sisusb); - ret |= sisusb_set_default_mode(sisusb, 1); + sisusb_set_default_mode(sisusb, 1); ret |= sisusb_setup_screen(sisusb, 1, initscreen); } } |