linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb-core: Remove Fix mes in file hcd.c
@ 2014-07-18 17:34 Nicholas Krause
  2014-07-18 19:09 ` Alan Stern
  2014-07-19  2:36 ` Sasha Levin
  0 siblings, 2 replies; 10+ messages in thread
From: Nicholas Krause @ 2014-07-18 17:34 UTC (permalink / raw)
  To: gregkh
  Cc: stern, mail, hdegoede, dan.j.williams, valentine.barshak,
	ming.lei, michael.opdenacker, linux-usb, linux-kernel

I am removing two fix mes in this file as after dicussing then it  seems
there is no reason to check against Null for usb_device as it can never
be NULL and this is check is therefore not needed.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bec31e2..487abcf 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	result = sscanf(buf, "%u\n", &val);
 	if (result == 1) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-24 16:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 17:34 [PATCH] usb-core: Remove Fix mes in file hcd.c Nicholas Krause
2014-07-18 19:09 ` Alan Stern
2014-07-18 19:55   ` Nick Krause
2014-07-19  2:36 ` Sasha Levin
2014-07-19  2:45   ` Nick Krause
2014-07-19  2:52     ` Nick Krause
2014-07-23  0:44       ` Sasha Levin
2014-07-23  3:24         ` Nick Krause
2014-07-24 13:07           ` Vlastimil Babka
2014-07-24 16:17             ` Nick Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).