summaryrefslogtreecommitdiff
path: root/drivers/hid/hidraw.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-05-17 12:41:22 +0200
committerJiri Kosina <jkosina@suse.cz>2016-05-17 12:41:22 +0200
commit3390e579b3dac71e630ed879a73c5ac3b4447045 (patch)
treefcd7f4118654286c1e634c87e4ad3efcea3c637d /drivers/hid/hidraw.c
parent27fd38c5226ed0f1712d071880fa8e739eb78650 (diff)
parent282bf1fe6dca4b768d6bedc14aea1b82c36241c1 (diff)
Merge branch 'for-4.7/upstream' into for-linus
Conflicts: drivers/hid/usbhid/hid-quirks.c
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r--drivers/hid/hidraw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index b9a76e3a7f17..f0e2757cb909 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -582,14 +582,13 @@ int __init hidraw_init(void)
result = alloc_chrdev_region(&dev_id, HIDRAW_FIRST_MINOR,
HIDRAW_MAX_DEVICES, "hidraw");
-
- hidraw_major = MAJOR(dev_id);
-
if (result < 0) {
pr_warn("can't get major number\n");
goto out;
}
+ hidraw_major = MAJOR(dev_id);
+
hidraw_class = class_create(THIS_MODULE, "hidraw");
if (IS_ERR(hidraw_class)) {
result = PTR_ERR(hidraw_class);