diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-29 23:26:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-06 01:18:26 +0300 |
commit | a885de67157e8e65b92af2e0a77f6eadd112d0b7 (patch) | |
tree | 44bbcfa367596ce5c16c85f165fd654747d32368 | |
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>
-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 894bda114224..8524450e75bd 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; } |