Signed-off-by: Lars R. Damerow <l...@grandstreet.us>
---
 drivers/usb/usbip/vhci_sysfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c
index 211f43f..b3371d0 100644
--- a/drivers/usb/usbip/vhci_sysfs.c
+++ b/drivers/usb/usbip/vhci_sysfs.c
@@ -114,8 +114,9 @@ static ssize_t store_detach(struct device *dev, struct 
device_attribute *attr,
        int err;
        __u32 rhport = 0;
 
-       if (sscanf(buf, "%u", &rhport) != 1)
-               return -EINVAL;
+       err = kstrtou32(buf, 10, &rhport);
+       if (err < 0)
+               return err;
 
        /* check rhport */
        if (rhport >= VHCI_NPORTS) {
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to