summaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/usbhid/hid-core.c')
-rw-r--r--drivers/hid/usbhid/hid-core.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index b06fee1b8e47..9ef9c0837d95 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1008,10 +1008,9 @@ static int usbhid_parse(struct hid_device *hid)
return -EINVAL;
}
- if (!(rdesc = kmalloc(rsize, GFP_KERNEL))) {
- dbg_hid("couldn't allocate rdesc memory\n");
+ rdesc = kmalloc(rsize, GFP_KERNEL);
+ if (!rdesc)
return -ENOMEM;
- }
hid_set_idle(dev, interface->desc.bInterfaceNumber, 0, 0);
@@ -1081,8 +1080,8 @@ static int usbhid_start(struct hid_device *hid)
if (hid->quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
dev->speed == USB_SPEED_HIGH) {
interval = fls(endpoint->bInterval*8);
- printk(KERN_INFO "%s: Fixing fullspeed to highspeed interval: %d -> %d\n",
- hid->name, endpoint->bInterval, interval);
+ pr_info("%s: Fixing fullspeed to highspeed interval: %d -> %d\n",
+ hid->name, endpoint->bInterval, interval);
}
/* Change the polling interval of mice and joysticks. */
@@ -1468,10 +1467,9 @@ static int hid_post_reset(struct usb_interface *intf)
* the size of the HID report descriptor has not changed.
*/
rdesc = kmalloc(hid->dev_rsize, GFP_KERNEL);
- if (!rdesc) {
- dbg_hid("couldn't allocate rdesc memory (post_reset)\n");
+ if (!rdesc)
return -ENOMEM;
- }
+
status = hid_get_class_descriptor(dev,
interface->desc.bInterfaceNumber,
HID_DT_REPORT, rdesc, hid->dev_rsize);
@@ -1649,7 +1647,7 @@ static int __init hid_init(void)
retval = usb_register(&hid_driver);
if (retval)
goto usb_register_fail;
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
+ pr_info(KBUILD_MODNAME ": " DRIVER_DESC "\n");
return 0;
usb_register_fail: