Message ID | 58187414-2ced-17cb-cb6a-0fe87d0e5fac@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f4ea3590954c..a5db000ed1c4 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2716,11 +2716,10 @@ EXPORT_SYMBOL_GPL(hid_add_device); struct hid_device *hid_allocate_device(void) { struct hid_device *hdev; - int ret = -ENOMEM; hdev = kzalloc(sizeof(*hdev), GFP_KERNEL); if (!hdev) - return ERR_PTR(ret); + return ERR_PTR(-ENOMEM); device_initialize(&hdev->dev); hdev->dev.release = hid_device_release;