summaryrefslogtreecommitdiff
path: root/drivers/firewire/core-device.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-03-18 13:57:32 +0400
committerJiri Kosina <jkosina@suse.cz>2013-03-18 13:57:57 +0400
commitaa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch)
treeb150bb2c83c073e1f0e298ba7899148f7d991ef7 /drivers/firewire/core-device.c
parent806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff)
parent6dbe51c251a327e012439c4772097a13df43c5b8 (diff)
downloadlinux-aa1262b3876ec5249ff464618a7dcd46b3ca54e2.tar.xz
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly added ITG-3200 driver.
Diffstat (limited to 'drivers/firewire/core-device.c')
-rw-r--r--drivers/firewire/core-device.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 3873d535b28d..03ce7d980c6a 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -1017,12 +1017,11 @@ static void fw_device_init(struct work_struct *work)
fw_device_get(device);
down_write(&fw_device_rwsem);
- ret = idr_pre_get(&fw_device_idr, GFP_KERNEL) ?
- idr_get_new(&fw_device_idr, device, &minor) :
- -ENOMEM;
+ minor = idr_alloc(&fw_device_idr, device, 0, 1 << MINORBITS,
+ GFP_KERNEL);
up_write(&fw_device_rwsem);
- if (ret < 0)
+ if (minor < 0)
goto error;
device->device.bus = &fw_bus_type;