diff options
author | David S. Miller <davem@davemloft.net> | 2020-08-02 11:02:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-02 11:02:12 +0300 |
commit | bd0b33b24897ba9ddad221e8ac5b6f0e38a2e004 (patch) | |
tree | 3f03062a9e759dba7b09df0feccbb58b8f7ab4cc /drivers/firmware/qemu_fw_cfg.c | |
parent | 7126bd5c8bcbc015cf89864cf71d750e8f33f924 (diff) | |
parent | ac3a0c8472969a03c0496ae774b3a29eb26c8d5a (diff) | |
download | linux-bd0b33b24897ba9ddad221e8ac5b6f0e38a2e004.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Resolved kernel/bpf/btf.c using instructions from merge commit
69138b34a7248d2396ab85c8652e20c0c39beaba
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/firmware/qemu_fw_cfg.c')
-rw-r--r-- | drivers/firmware/qemu_fw_cfg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c index 039e0f91dba8..6945c3c96637 100644 --- a/drivers/firmware/qemu_fw_cfg.c +++ b/drivers/firmware/qemu_fw_cfg.c @@ -605,8 +605,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f) /* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */ err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype, fw_cfg_sel_ko, "%d", entry->select); - if (err) - goto err_register; + if (err) { + kobject_put(&entry->kobj); + return err; + } /* add raw binary content access */ err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw); @@ -622,7 +624,6 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f) err_add_raw: kobject_del(&entry->kobj); -err_register: kfree(entry); return err; } |