usb/host/fotg210: remove dead code in create_sysfs_files
authorColin Ian King <colin.king@canonical.com>
Sun, 8 May 2016 19:14:29 +0000 (20:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2016 11:08:46 +0000 (13:08 +0200)
The goto in create_sysfs_files is never executed, so remove it
and clean up the code.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/fotg210-hcd.c

index 360a5e9..66efa9a 100644 (file)
@@ -4795,14 +4795,8 @@ static DEVICE_ATTR(uframe_periodic_max, 0644, show_uframe_periodic_max,
 static inline int create_sysfs_files(struct fotg210_hcd *fotg210)
 {
        struct device *controller = fotg210_to_hcd(fotg210)->self.controller;
-       int i = 0;
 
-       if (i)
-               goto out;
-
-       i = device_create_file(controller, &dev_attr_uframe_periodic_max);
-out:
-       return i;
+       return device_create_file(controller, &dev_attr_uframe_periodic_max);
 }
 
 static inline void remove_sysfs_files(struct fotg210_hcd *fotg210)