summaryrefslogtreecommitdiffstats
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
parentMerge branches 'for-4.6/upstream-fixes', 'for-4.7/asus', 'for-4.7/hidraw' and... (diff)
parentHID: usbhid: quirks for Corsair RGB keyboard & mice (K70R, K95RGB, M65RGB, K7... (diff)
downloadlinux-3390e579b3dac71e630ed879a73c5ac3b4447045.tar.xz
linux-3390e579b3dac71e630ed879a73c5ac3b4447045.zip
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);