diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-29 20:26:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 22:18:26 (GMT) |
commit | a885de67157e8e65b92af2e0a77f6eadd112d0b7 (patch) | |
tree | 44bbcfa367596ce5c16c85f165fd654747d32368 /drivers/base/firmware_class.c | |
parent | 223e8f01b072152cc4336e7dcb1cf8c21ab34432 (diff) | |
download | linux-a885de67157e8e65b92af2e0a77f6eadd112d0b7.tar.xz |
firmware: fix wrong memory deallocation in fw_add_devm_name()
Device resource data allocated with devres_alloc() must be deallocated
by devres_free().
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 894bda1..8524450 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -443,7 +443,7 @@ static int fw_add_devm_name(struct device *dev, const char *name) return -ENOMEM; fwn->name = kstrdup_const(name, GFP_KERNEL); if (!fwn->name) { - kfree(fwn); + devres_free(fwn); return -ENOMEM; } |