Commit bc776413 authored by Marc Dietrich's avatar Marc Dietrich Committed by Ben Hutchings

staging: nvec: remove managed resource from PS2 driver

commit 68fae2f3 upstream.

This basicly reverts commit e534f3e9 (staging:nvec: Introduce the use of
the managed version of kzalloc). Serio struct should never by managed
because it is refcounted. Doing so will lead to a double free oops on module
remove.
Signed-off-by: default avatarMarc Dietrich <marvin24@gmx.de>
Fixes: e534f3e9 ("staging:nvec: Introduce the use of the managed version of kzalloc")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 2386b74f
...@@ -105,7 +105,7 @@ static int nvec_mouse_probe(struct platform_device *pdev) ...@@ -105,7 +105,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
struct serio *ser_dev; struct serio *ser_dev;
ser_dev = devm_kzalloc(&pdev->dev, sizeof(struct serio), GFP_KERNEL); ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (ser_dev == NULL) if (ser_dev == NULL)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment