[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1406120170-22983-1-git-send-email-sasha.levin@oracle.com>
Date: Wed, 23 Jul 2014 08:56:10 -0400
From: Sasha Levin <sasha.levin@...cle.com>
To: gregkh@...uxfoundation.org
Cc: stern@...land.harvard.edu, mail@...ermatthias.de,
hdegoede@...hat.com, sarah.a.sharp@...ux.intel.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
rostedt@...dmis.org, Sasha Levin <sasha.levin@...cle.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
Revert since the commit message is incorrect and the original author refuses
to fix/maintain it because "it's in the kernel already".
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/usb/core/hcd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 487abcf..bec31e2 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,6 +855,8 @@ 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);
}
@@ -869,6 +871,8 @@ 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists