Skip to content

Commit 68fae2f

Browse files
marvintwentyfourgregkh
authored andcommitted
staging: nvec: remove managed resource from PS2 driver
This basicly reverts commit e534f3e (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: Marc Dietrich <[email protected]> Fixes: e534f3e ("staging:nvec: Introduce the use of the managed version of kzalloc") Cc: stable <[email protected]> # 3.15+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 17c1c9b commit 68fae2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/nvec/nvec_ps2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
107107
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
108108
struct serio *ser_dev;
109109

110-
ser_dev = devm_kzalloc(&pdev->dev, sizeof(struct serio), GFP_KERNEL);
110+
ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
111111
if (!ser_dev)
112112
return -ENOMEM;
113113

0 commit comments

Comments
 (0)