diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
commit | 0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7 (patch) | |
tree | 44d6ba1879278a5a1b58178e9b0f799427e52e0e /drivers/firewire/core-device.c | |
parent | b2f557a21bc8fffdcd65794eda8a854e024999f3 (diff) | |
parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'drivers/firewire/core-device.c')
-rw-r--r-- | drivers/firewire/core-device.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index aa597cda0d88..2828e9573e90 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -717,14 +717,11 @@ static void create_units(struct fw_device *device) fw_unit_attributes, &unit->attribute_group); - if (device_register(&unit->device) < 0) - goto skip_unit; - fw_device_get(device); - continue; - - skip_unit: - kfree(unit); + if (device_register(&unit->device) < 0) { + put_device(&unit->device); + continue; + } } } |