Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a885de67 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Greg Kroah-Hartman
Browse files

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: default avatarVladimir Zapolskiy <vz@mleia.com>
Acked-by: default avatarMing Lei <ming.lei@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 223e8f01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}