Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396472 > unrolled thread

[PATCH] usb/host/fotg210: remove dead code in create_sysfs_files

Started byColin King <colin.king@canonical.com>
First post2016-05-08 21:20 +0200
Last post2016-05-08 21:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] usb/host/fotg210: remove dead code in create_sysfs_files Colin King <colin.king@canonical.com> - 2016-05-08 21:20 +0200

#1396472 — [PATCH] usb/host/fotg210: remove dead code in create_sysfs_files

FromColin King <colin.king@canonical.com>
Date2016-05-08 21:20 +0200
Subject[PATCH] usb/host/fotg210: remove dead code in create_sysfs_files
Message-ID<rwCpb-4eI-3@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/usb/host/fotg210-hcd.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 360a5e9..66efa9a 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -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)
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web