usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializers
authorSergey Shtylyov <s.shtylyov@omp.ru>
Mon, 14 Feb 2022 19:56:16 +0000 (22:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Feb 2022 14:11:20 +0000 (15:11 +0100)
The 'ret' local variables are often initialized to 0 but this value is
unused, thus we can kill those initializers...

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/901b7478-45b6-d8b3-f5c6-555712485232@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ohci-dbg.c

index 0b7f1edd9eec4435c572d22ea627063b5eee6a5e..c063fb0429265a429a6b80c45b2197f2ff4b903d 100644 (file)
@@ -931,7 +931,7 @@ static struct debug_buffer *alloc_buffer(struct usb_bus *bus,
 
 static int fill_buffer(struct debug_buffer *buf)
 {
-       int ret = 0;
+       int ret;
 
        if (!buf->output_buf)
                buf->output_buf = vmalloc(buf->alloc_size);
@@ -956,7 +956,7 @@ static ssize_t debug_output(struct file *file, char __user *user_buf,
                size_t len, loff_t *offset)
 {
        struct debug_buffer *buf = file->private_data;
-       int ret = 0;
+       int ret;
 
        mutex_lock(&buf->mutex);
        if (buf->count == 0) {
index 4f267dc93882a52579f265e9df0c442e6395531c..76bc8d56325d13b412ba2dc1f08d1e6a2a57d1c7 100644 (file)
@@ -680,7 +680,7 @@ static struct debug_buffer *alloc_buffer(struct ohci_hcd *ohci,
 
 static int fill_buffer(struct debug_buffer *buf)
 {
-       int ret = 0;
+       int ret;
 
        if (!buf->page)
                buf->page = (char *)get_zeroed_page(GFP_KERNEL);
@@ -705,7 +705,7 @@ static ssize_t debug_output(struct file *file, char __user *user_buf,
                        size_t len, loff_t *offset)
 {
        struct debug_buffer *buf = file->private_data;
-       int ret = 0;
+       int ret;
 
        mutex_lock(&buf->mutex);
        if (buf->count == 0) {